diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..6137bef2 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,8 @@ +# Code owners file. +# This file controls who is tagged for review for any given pull request. + +# For syntax help see: +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax + +# The 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..0b8cd9da --- /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-security-privateca/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. security-privateca 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..9b8503fb --- /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-security-privateca/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/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/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/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..a1d50073 --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,14 @@ +on: + pull_request: +name: samples +jobs: + lint: + 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..89256a28 --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,111 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Java version +java -version +echo ${JOB_TYPE} + +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C + +# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it +if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then + export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) +fi + +RETURN_CODE=0 +set +e + +case ${JOB_TYPE} in +test) + mvn test -B -Dclirr.skip=true -Denforcer.skip=true + RETURN_CODE=$? + ;; +lint) + mvn com.coveo:fmt-maven-plugin:check + RETURN_CODE=$? + ;; +javadoc) + mvn javadoc:javadoc javadoc:test-javadoc + RETURN_CODE=$? + ;; +integration) + mvn -B ${INTEGRATION_TEST_ARGS} \ + -Penable-integration-tests \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + ;; +samples) + if [[ -f samples/pom.xml ]] + then + pushd samples + mvn -B \ + -Penable-samples \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + popd + else + echo "no sample pom.xml found - skipping sample tests" + fi + ;; +clirr) + mvn -B -Denforcer.skip=true clirr:check + RETURN_CODE=$? + ;; +*) + ;; +esac + +if [ "${REPORT_COVERAGE}" == "true" ] +then + bash ${KOKORO_GFILE_DIR}/codecov.sh +fi + +# fix output location of logs +bash .kokoro/coerce_logs.sh + +if [[ "${ENABLE_BUILD_COP}" == "true" ]] +then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop + ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-security-privateca +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..8e9e8273 --- /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-security-privateca/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-security-privateca/.kokoro/build.sh" +} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 00000000..a8d0ea04 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +function retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + + # store current flag state + flags=$- + + # allow a failures to continue + set +e + echo "${command}" + ${command} + exit_code=$? + + # restore "e" flag + if [[ ${flags} =~ e ]] + then set -e + else set +e + fi + + if [[ $exit_code == 0 ]] + then + return 0 + fi + + # failure + if [[ ${attempts_left} > 0 ]] + then + echo "failure (${exit_code}), sleeping ${sleep_seconds}..." + sleep ${sleep_seconds} + new_attempts=$((${attempts_left} - 1)) + new_sleep=$((${sleep_seconds} * 2)) + retry_with_backoff ${new_attempts} ${new_sleep} ${command} + fi + + return $exit_code +} + +## Helper functionss +function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } +function msg() { println "$*" >&2; } +function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 00000000..6ee0b07a --- /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-security-privateca/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-security-privateca/.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/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..6ee0b07a --- /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-security-privateca/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-security-privateca/.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..bf1ebf07 --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-security-privateca/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 00000000..c2db4ade --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-security-privateca/.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..2c5c0578 --- /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-security-privateca/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-security-privateca/.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..94b76e03 --- /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-security-privateca/.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..bf1ebf07 --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-security-privateca/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 00000000..c2db4ade --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-security-privateca/.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..683ff8bf --- /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-security-privateca/.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/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 00000000..e7c89ef9 --- /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-security-privateca/.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-security-privateca/.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..a8140c00 --- /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-security-privateca/.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..e290eea3 --- /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-security-privateca/.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..e7b4bd1e --- /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-security-privateca/.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..2609f188 --- /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-staging" + # Production will be at: docs-staging-v2 +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-security-privateca/.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..0f7f51d1 --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# Copyright 2019 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET}" ]]; then + echo "Need to set STAGING_BUCKET environment variable" + exit 1 +fi + +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +NAME=google-cloud-security-privateca +VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# build the docs +mvn site -B -q + +pushd target/site/apidocs + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload docs +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET} + +popd + +# V2 +mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" + +pushd target/devsite + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload docs +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg new file mode 100644 index 00000000..087171f1 --- /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-security-privateca/.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..4e7f90ca --- /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-security-privateca/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-security-privateca/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-security-privateca" + } +} + +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..3c482cbc --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Start the releasetool reporter +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DskipTests=true \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} + +if [[ -n "${AUTORELEASE_PR}" ]] +then + mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml +fi \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh 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..e58264b7 --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "security-privateca", + "name_pretty": "Certificate Authority Service", + "product_documentation": "https://cloud.google.com/certificate-authority-service", + "api_description": "simplifies the deployment and management of private CAs without managing infrastructure.", + "client_documentation": "https://googleapis.dev/java/google-cloud-security-privateca/latest/index.html", + "release_level": "beta", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-security-privateca", + "repo_short": "java-security-privateca", + "distribution_name": "com.google.cloud:google-cloud-security-privateca", + "api_id": "security-privateca.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..6b2238bb --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,93 @@ +# 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 *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the +Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out the Project Steward, please email +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..fa29bc1b --- /dev/null +++ b/README.md @@ -0,0 +1,143 @@ +# Google Certificate Authority Service Client for Java + +Java idiomatic client for [Certificate Authority Service][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +## Quickstart + + +If you are using Maven, add this to your pom.xml file: + +```xml + + com.google.cloud + google-cloud-security-privateca + 0.0.0 + +``` + +[//]: # ({x-version-update-start:google-cloud-security-privateca:released}) + +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-security-privateca:0.0.0' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-security-privateca" % "0.0.0" +``` +[//]: # ({x-version-update-end}) + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Certificate Authority Service [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Certificate Authority Service. +[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-security-privateca` library. See the [Quickstart](#quickstart) section +to add `google-cloud-security-privateca` as a dependency in your code. + +## About Certificate Authority Service + + +[Certificate Authority Service][product-docs] simplifies the deployment and management of private CAs without managing infrastructure. + +See the [Certificate Authority Service client library docs][javadocs] to learn how to +use this Certificate Authority Service Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Certificate Authority Service uses gRPC for the transport layer. + +## Java Versions + +Java 7 or above is required for using this client. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +[product-docs]: https://cloud.google.com/certificate-authority-service +[javadocs]: https://googleapis.dev/java/google-cloud-security-privateca/latest/index.html +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-security-privateca/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-security-privateca/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-security-privateca/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-security-privateca/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-security-privateca/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-security-privateca/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-security-privateca/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-security-privateca/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-security-privateca/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-security-privateca/java11.html +[stability-image]: https://img.shields.io/badge/stability-beta-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-security-privateca.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-security-privateca&core=gav +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-sdk]: https://cloud.google.com/sdk/ +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-security-privateca/blob/master/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-security-privateca/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-security-privateca/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=security-privateca.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-security-privateca-bom/pom.xml b/google-cloud-security-privateca-bom/pom.xml new file mode 100644 index 00000000..aae7ce0b --- /dev/null +++ b/google-cloud-security-privateca-bom/pom.xml @@ -0,0 +1,97 @@ + + + 4.0.0 + com.google.cloud + google-cloud-security-privateca-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 0.9.2 + + + Google Certificate Authority Service BOM + https://github.com/googleapis/java-security-privateca + + BOM for Certificate Authority Service + + + + Google LLC + + + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + + + scm:git:https://github.com/googleapis/java-security-privateca.git + scm:git:git@github.com:googleapis/java-security-privateca.git + https://github.com/googleapis/java-security-privateca + + + + 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-security-privateca + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-security-privateca-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-security-privateca-v1beta1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + \ No newline at end of file diff --git a/google-cloud-security-privateca/pom.xml b/google-cloud-security-privateca/pom.xml new file mode 100644 index 00000000..8723c909 --- /dev/null +++ b/google-cloud-security-privateca/pom.xml @@ -0,0 +1,111 @@ + + + 4.0.0 + com.google.cloud + google-cloud-security-privateca + 0.0.1-SNAPSHOT + jar + Google Certificate Authority Service + https://github.com/googleapis/java-security-privateca + simplifies the deployment and management of private CAs without managing infrastructure. + + com.google.cloud + google-cloud-security-privateca-parent + 0.0.1-SNAPSHOT + + + google-cloud-security-privateca + + + + 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-security-privateca-v1beta1 + + + 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-security-privateca-v1beta1 + test + + + + com.google.api + gax-grpc + testlib + test + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceClient.java b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceClient.java new file mode 100644 index 00000000..cd30e502 --- /dev/null +++ b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceClient.java @@ -0,0 +1,3690 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.security.privateca.v1beta1.stub.CertificateAuthorityServiceStub; +import com.google.cloud.security.privateca.v1beta1.stub.CertificateAuthorityServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: [Certificate Authority + * Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private + * certificate authorities and issued certificates. + * + *

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

+ * 
+ * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+ *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+ *   Certificate certificate = Certificate.newBuilder().build();
+ *   String certificateId = "";
+ *   Certificate response = certificateAuthorityServiceClient.createCertificate(parent, certificate, certificateId);
+ * }
+ * 
+ * 
+ * + *

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

To customize credentials: + * + *

+ * 
+ * CertificateAuthorityServiceSettings certificateAuthorityServiceSettings =
+ *     CertificateAuthorityServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CertificateAuthorityServiceClient certificateAuthorityServiceClient =
+ *     CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * CertificateAuthorityServiceSettings certificateAuthorityServiceSettings =
+ *     CertificateAuthorityServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CertificateAuthorityServiceClient certificateAuthorityServiceClient =
+ *     CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CertificateAuthorityServiceClient implements BackgroundResource { + private final CertificateAuthorityServiceSettings settings; + private final CertificateAuthorityServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of CertificateAuthorityServiceClient with default settings. */ + public static final CertificateAuthorityServiceClient create() throws IOException { + return create(CertificateAuthorityServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CertificateAuthorityServiceClient, 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 CertificateAuthorityServiceClient create( + CertificateAuthorityServiceSettings settings) throws IOException { + return new CertificateAuthorityServiceClient(settings); + } + + /** + * Constructs an instance of CertificateAuthorityServiceClient, using the given stub for making + * calls. This is for advanced usage - prefer to use CertificateAuthorityServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final CertificateAuthorityServiceClient create( + CertificateAuthorityServiceStub stub) { + return new CertificateAuthorityServiceClient(stub); + } + + /** + * Constructs an instance of CertificateAuthorityServiceClient, 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 CertificateAuthorityServiceClient(CertificateAuthorityServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((CertificateAuthorityServiceStubSettings) 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 CertificateAuthorityServiceClient(CertificateAuthorityServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final CertificateAuthorityServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CertificateAuthorityServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given + * Project, Location from a particular + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   Certificate certificate = Certificate.newBuilder().build();
+   *   String certificateId = "";
+   *   Certificate response = certificateAuthorityServiceClient.createCertificate(parent, certificate, certificateId);
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location and + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in + * the format `projects/*/locations/*/certificateAuthorities/*`. + * @param certificate Required. A + * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field + * values. + * @param certificateId Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * Enterprise + * [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier], + * but is optional and its value is ignored otherwise. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Certificate createCertificate( + CertificateAuthorityName parent, Certificate certificate, String certificateId) { + CreateCertificateRequest request = + CreateCertificateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCertificate(certificate) + .setCertificateId(certificateId) + .build(); + return createCertificate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given + * Project, Location from a particular + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   Certificate certificate = Certificate.newBuilder().build();
+   *   String certificateId = "";
+   *   Certificate response = certificateAuthorityServiceClient.createCertificate(parent.toString(), certificate, certificateId);
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location and + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in + * the format `projects/*/locations/*/certificateAuthorities/*`. + * @param certificate Required. A + * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field + * values. + * @param certificateId Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * Enterprise + * [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier], + * but is optional and its value is ignored otherwise. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Certificate createCertificate( + String parent, Certificate certificate, String certificateId) { + CreateCertificateRequest request = + CreateCertificateRequest.newBuilder() + .setParent(parent) + .setCertificate(certificate) + .setCertificateId(certificateId) + .build(); + return createCertificate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given + * Project, Location from a particular + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   Certificate certificate = Certificate.newBuilder().build();
+   *   CreateCertificateRequest request = CreateCertificateRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setCertificate(certificate)
+   *     .build();
+   *   Certificate response = certificateAuthorityServiceClient.createCertificate(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 Certificate createCertificate(CreateCertificateRequest request) { + return createCertificateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given + * Project, Location from a particular + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   Certificate certificate = Certificate.newBuilder().build();
+   *   CreateCertificateRequest request = CreateCertificateRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setCertificate(certificate)
+   *     .build();
+   *   ApiFuture<Certificate> future = certificateAuthorityServiceClient.createCertificateCallable().futureCall(request);
+   *   // Do something
+   *   Certificate response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createCertificateCallable() { + return stub.createCertificateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
+   *   Certificate response = certificateAuthorityServiceClient.getCertificate(name);
+   * }
+   * 
+ * + * @param name Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of + * the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Certificate getCertificate(CertificateName name) { + GetCertificateRequest request = + GetCertificateRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCertificate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
+   *   Certificate response = certificateAuthorityServiceClient.getCertificate(name.toString());
+   * }
+   * 
+ * + * @param name Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of + * the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Certificate getCertificate(String name) { + GetCertificateRequest request = GetCertificateRequest.newBuilder().setName(name).build(); + return getCertificate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
+   *   GetCertificateRequest request = GetCertificateRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Certificate response = certificateAuthorityServiceClient.getCertificate(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 Certificate getCertificate(GetCertificateRequest request) { + return getCertificateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
+   *   GetCertificateRequest request = GetCertificateRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Certificate> future = certificateAuthorityServiceClient.getCertificateCallable().futureCall(request);
+   *   // Do something
+   *   Certificate response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getCertificateCallable() { + return stub.getCertificateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   for (Certificate element : certificateAuthorityServiceClient.listCertificates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format + * `projects/*/locations/*/certificateauthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificatesPagedResponse listCertificates(CertificateAuthorityName parent) { + ListCertificatesRequest request = + ListCertificatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCertificates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   for (Certificate element : certificateAuthorityServiceClient.listCertificates(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format + * `projects/*/locations/*/certificateauthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificatesPagedResponse listCertificates(String parent) { + ListCertificatesRequest request = + ListCertificatesRequest.newBuilder().setParent(parent).build(); + return listCertificates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   ListCertificatesRequest request = ListCertificatesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (Certificate element : certificateAuthorityServiceClient.listCertificates(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificatesPagedResponse listCertificates(ListCertificatesRequest request) { + return listCertificatesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   ListCertificatesRequest request = ListCertificatesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListCertificatesPagedResponse> future = certificateAuthorityServiceClient.listCertificatesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Certificate element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listCertificatesPagedCallable() { + return stub.listCertificatesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   ListCertificatesRequest request = ListCertificatesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListCertificatesResponse response = certificateAuthorityServiceClient.listCertificatesCallable().call(request);
+   *     for (Certificate element : response.getCertificatesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listCertificatesCallable() { + return stub.listCertificatesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
+   *   Certificate response = certificateAuthorityServiceClient.revokeCertificate(name);
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format + * `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Certificate revokeCertificate(CertificateName name) { + RevokeCertificateRequest request = + RevokeCertificateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return revokeCertificate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
+   *   Certificate response = certificateAuthorityServiceClient.revokeCertificate(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format + * `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Certificate revokeCertificate(String name) { + RevokeCertificateRequest request = RevokeCertificateRequest.newBuilder().setName(name).build(); + return revokeCertificate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
+   *   RevocationReason reason = RevocationReason.REVOCATION_REASON_UNSPECIFIED;
+   *   RevokeCertificateRequest request = RevokeCertificateRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setReason(reason)
+   *     .build();
+   *   Certificate response = certificateAuthorityServiceClient.revokeCertificate(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 Certificate revokeCertificate(RevokeCertificateRequest request) { + return revokeCertificateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
+   *   RevocationReason reason = RevocationReason.REVOCATION_REASON_UNSPECIFIED;
+   *   RevokeCertificateRequest request = RevokeCertificateRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setReason(reason)
+   *     .build();
+   *   ApiFuture<Certificate> future = certificateAuthorityServiceClient.revokeCertificateCallable().futureCall(request);
+   *   // Do something
+   *   Certificate response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable revokeCertificateCallable() { + return stub.revokeCertificateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   Certificate certificate = Certificate.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Certificate response = certificateAuthorityServiceClient.updateCertificate(certificate, updateMask);
+   * }
+   * 
+ * + * @param certificate Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] + * with updated values. + * @param updateMask Required. A list of fields to be updated in this request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Certificate updateCertificate(Certificate certificate, FieldMask updateMask) { + UpdateCertificateRequest request = + UpdateCertificateRequest.newBuilder() + .setCertificate(certificate) + .setUpdateMask(updateMask) + .build(); + return updateCertificate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   Certificate certificate = Certificate.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateCertificateRequest request = UpdateCertificateRequest.newBuilder()
+   *     .setCertificate(certificate)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   Certificate response = certificateAuthorityServiceClient.updateCertificate(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 Certificate updateCertificate(UpdateCertificateRequest request) { + return updateCertificateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   Certificate certificate = Certificate.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateCertificateRequest request = UpdateCertificateRequest.newBuilder()
+   *     .setCertificate(certificate)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   ApiFuture<Certificate> future = certificateAuthorityServiceClient.updateCertificateCallable().futureCall(request);
+   *   // Do something
+   *   Certificate response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateCertificateCallable() { + return stub.updateCertificateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * that is in state + * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] + * and is of type + * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. + * After the parent Certificate Authority signs a certificate signing request from + * [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], + * this method can complete the activation process. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.activateCertificateAuthorityAsync(name).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + activateCertificateAuthorityAsync(CertificateAuthorityName name) { + ActivateCertificateAuthorityRequest request = + ActivateCertificateAuthorityRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return activateCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * that is in state + * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] + * and is of type + * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. + * After the parent Certificate Authority signs a certificate signing request from + * [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], + * this method can complete the activation process. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.activateCertificateAuthorityAsync(name.toString()).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + activateCertificateAuthorityAsync(String name) { + ActivateCertificateAuthorityRequest request = + ActivateCertificateAuthorityRequest.newBuilder().setName(name).build(); + return activateCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * that is in state + * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] + * and is of type + * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. + * After the parent Certificate Authority signs a certificate signing request from + * [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], + * this method can complete the activation process. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   String pemCaCertificate = "";
+   *   SubordinateConfig subordinateConfig = SubordinateConfig.newBuilder().build();
+   *   ActivateCertificateAuthorityRequest request = ActivateCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setPemCaCertificate(pemCaCertificate)
+   *     .setSubordinateConfig(subordinateConfig)
+   *     .build();
+   *   CertificateAuthority response = certificateAuthorityServiceClient.activateCertificateAuthorityAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + activateCertificateAuthorityAsync(ActivateCertificateAuthorityRequest request) { + return activateCertificateAuthorityOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * that is in state + * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] + * and is of type + * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. + * After the parent Certificate Authority signs a certificate signing request from + * [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], + * this method can complete the activation process. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   String pemCaCertificate = "";
+   *   SubordinateConfig subordinateConfig = SubordinateConfig.newBuilder().build();
+   *   ActivateCertificateAuthorityRequest request = ActivateCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setPemCaCertificate(pemCaCertificate)
+   *     .setSubordinateConfig(subordinateConfig)
+   *     .build();
+   *   OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.activateCertificateAuthorityOperationCallable().futureCall(request);
+   *   // Do something
+   *   CertificateAuthority response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + ActivateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + activateCertificateAuthorityOperationCallable() { + return stub.activateCertificateAuthorityOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * that is in state + * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] + * and is of type + * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. + * After the parent Certificate Authority signs a certificate signing request from + * [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], + * this method can complete the activation process. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   String pemCaCertificate = "";
+   *   SubordinateConfig subordinateConfig = SubordinateConfig.newBuilder().build();
+   *   ActivateCertificateAuthorityRequest request = ActivateCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setPemCaCertificate(pemCaCertificate)
+   *     .setSubordinateConfig(subordinateConfig)
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.activateCertificateAuthorityCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + activateCertificateAuthorityCallable() { + return stub.activateCertificateAuthorityCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given + * Project and Location. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
+   *   String certificateAuthorityId = "";
+   *   CertificateAuthority response = certificateAuthorityServiceClient.createCertificateAuthorityAsync(parent, certificateAuthority, certificateAuthorityId).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in + * the format `projects/*/locations/*`. + * @param certificateAuthority Required. A + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with + * initial field values. + * @param certificateAuthorityId Required. It must be unique within a location and match the + * regular expression `[a-zA-Z0-9-]{1,63}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + createCertificateAuthorityAsync( + LocationName parent, + CertificateAuthority certificateAuthority, + String certificateAuthorityId) { + CreateCertificateAuthorityRequest request = + CreateCertificateAuthorityRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCertificateAuthority(certificateAuthority) + .setCertificateAuthorityId(certificateAuthorityId) + .build(); + return createCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given + * Project and Location. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
+   *   String certificateAuthorityId = "";
+   *   CertificateAuthority response = certificateAuthorityServiceClient.createCertificateAuthorityAsync(parent.toString(), certificateAuthority, certificateAuthorityId).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in + * the format `projects/*/locations/*`. + * @param certificateAuthority Required. A + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with + * initial field values. + * @param certificateAuthorityId Required. It must be unique within a location and match the + * regular expression `[a-zA-Z0-9-]{1,63}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + createCertificateAuthorityAsync( + String parent, CertificateAuthority certificateAuthority, String certificateAuthorityId) { + CreateCertificateAuthorityRequest request = + CreateCertificateAuthorityRequest.newBuilder() + .setParent(parent) + .setCertificateAuthority(certificateAuthority) + .setCertificateAuthorityId(certificateAuthorityId) + .build(); + return createCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given + * Project and Location. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String certificateAuthorityId = "";
+   *   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
+   *   CreateCertificateAuthorityRequest request = CreateCertificateAuthorityRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setCertificateAuthorityId(certificateAuthorityId)
+   *     .setCertificateAuthority(certificateAuthority)
+   *     .build();
+   *   CertificateAuthority response = certificateAuthorityServiceClient.createCertificateAuthorityAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + createCertificateAuthorityAsync(CreateCertificateAuthorityRequest request) { + return createCertificateAuthorityOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given + * Project and Location. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String certificateAuthorityId = "";
+   *   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
+   *   CreateCertificateAuthorityRequest request = CreateCertificateAuthorityRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setCertificateAuthorityId(certificateAuthorityId)
+   *     .setCertificateAuthority(certificateAuthority)
+   *     .build();
+   *   OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.createCertificateAuthorityOperationCallable().futureCall(request);
+   *   // Do something
+   *   CertificateAuthority response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + CreateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + createCertificateAuthorityOperationCallable() { + return stub.createCertificateAuthorityOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given + * Project and Location. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String certificateAuthorityId = "";
+   *   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
+   *   CreateCertificateAuthorityRequest request = CreateCertificateAuthorityRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setCertificateAuthorityId(certificateAuthorityId)
+   *     .setCertificateAuthority(certificateAuthority)
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.createCertificateAuthorityCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + createCertificateAuthorityCallable() { + return stub.createCertificateAuthorityCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.disableCertificateAuthorityAsync(name).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + disableCertificateAuthorityAsync(CertificateAuthorityName name) { + DisableCertificateAuthorityRequest request = + DisableCertificateAuthorityRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return disableCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.disableCertificateAuthorityAsync(name.toString()).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + disableCertificateAuthorityAsync(String name) { + DisableCertificateAuthorityRequest request = + DisableCertificateAuthorityRequest.newBuilder().setName(name).build(); + return disableCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   DisableCertificateAuthorityRequest request = DisableCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   CertificateAuthority response = certificateAuthorityServiceClient.disableCertificateAuthorityAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + disableCertificateAuthorityAsync(DisableCertificateAuthorityRequest request) { + return disableCertificateAuthorityOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   DisableCertificateAuthorityRequest request = DisableCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.disableCertificateAuthorityOperationCallable().futureCall(request);
+   *   // Do something
+   *   CertificateAuthority response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + DisableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + disableCertificateAuthorityOperationCallable() { + return stub.disableCertificateAuthorityOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   DisableCertificateAuthorityRequest request = DisableCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.disableCertificateAuthorityCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + disableCertificateAuthorityCallable() { + return stub.disableCertificateAuthorityCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.enableCertificateAuthorityAsync(name).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + enableCertificateAuthorityAsync(CertificateAuthorityName name) { + EnableCertificateAuthorityRequest request = + EnableCertificateAuthorityRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return enableCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.enableCertificateAuthorityAsync(name.toString()).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + enableCertificateAuthorityAsync(String name) { + EnableCertificateAuthorityRequest request = + EnableCertificateAuthorityRequest.newBuilder().setName(name).build(); + return enableCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   EnableCertificateAuthorityRequest request = EnableCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   CertificateAuthority response = certificateAuthorityServiceClient.enableCertificateAuthorityAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + enableCertificateAuthorityAsync(EnableCertificateAuthorityRequest request) { + return enableCertificateAuthorityOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   EnableCertificateAuthorityRequest request = EnableCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.enableCertificateAuthorityOperationCallable().futureCall(request);
+   *   // Do something
+   *   CertificateAuthority response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + EnableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + enableCertificateAuthorityOperationCallable() { + return stub.enableCertificateAuthorityOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   EnableCertificateAuthorityRequest request = EnableCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.enableCertificateAuthorityCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + enableCertificateAuthorityCallable() { + return stub.enableCertificateAuthorityCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Fetch a certificate signing request (CSR) from a + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in + * state + * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] + * and is of type + * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. + * The CSR must then be signed by the desired parent Certificate Authority, which could be another + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, + * or could be an on-prem certificate authority. See also + * [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   FetchCertificateAuthorityCsrResponse response = certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(name);
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr( + CertificateAuthorityName name) { + FetchCertificateAuthorityCsrRequest request = + FetchCertificateAuthorityCsrRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return fetchCertificateAuthorityCsr(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Fetch a certificate signing request (CSR) from a + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in + * state + * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] + * and is of type + * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. + * The CSR must then be signed by the desired parent Certificate Authority, which could be another + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, + * or could be an on-prem certificate authority. See also + * [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   FetchCertificateAuthorityCsrResponse response = certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(String name) { + FetchCertificateAuthorityCsrRequest request = + FetchCertificateAuthorityCsrRequest.newBuilder().setName(name).build(); + return fetchCertificateAuthorityCsr(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Fetch a certificate signing request (CSR) from a + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in + * state + * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] + * and is of type + * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. + * The CSR must then be signed by the desired parent Certificate Authority, which could be another + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, + * or could be an on-prem certificate authority. See also + * [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   FetchCertificateAuthorityCsrRequest request = FetchCertificateAuthorityCsrRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   FetchCertificateAuthorityCsrResponse response = certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(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 FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr( + FetchCertificateAuthorityCsrRequest request) { + return fetchCertificateAuthorityCsrCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Fetch a certificate signing request (CSR) from a + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in + * state + * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] + * and is of type + * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. + * The CSR must then be signed by the desired parent Certificate Authority, which could be another + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, + * or could be an on-prem certificate authority. See also + * [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   FetchCertificateAuthorityCsrRequest request = FetchCertificateAuthorityCsrRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<FetchCertificateAuthorityCsrResponse> future = certificateAuthorityServiceClient.fetchCertificateAuthorityCsrCallable().futureCall(request);
+   *   // Do something
+   *   FetchCertificateAuthorityCsrResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable< + FetchCertificateAuthorityCsrRequest, FetchCertificateAuthorityCsrResponse> + fetchCertificateAuthorityCsrCallable() { + return stub.fetchCertificateAuthorityCsrCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.getCertificateAuthority(name);
+   * }
+   * 
+ * + * @param name Required. The + * [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to + * get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateAuthority getCertificateAuthority(CertificateAuthorityName name) { + GetCertificateAuthorityRequest request = + GetCertificateAuthorityRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getCertificateAuthority(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.getCertificateAuthority(name.toString());
+   * }
+   * 
+ * + * @param name Required. The + * [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to + * get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateAuthority getCertificateAuthority(String name) { + GetCertificateAuthorityRequest request = + GetCertificateAuthorityRequest.newBuilder().setName(name).build(); + return getCertificateAuthority(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   GetCertificateAuthorityRequest request = GetCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   CertificateAuthority response = certificateAuthorityServiceClient.getCertificateAuthority(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 CertificateAuthority getCertificateAuthority( + GetCertificateAuthorityRequest request) { + return getCertificateAuthorityCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   GetCertificateAuthorityRequest request = GetCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<CertificateAuthority> future = certificateAuthorityServiceClient.getCertificateAuthorityCallable().futureCall(request);
+   *   // Do something
+   *   CertificateAuthority response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + getCertificateAuthorityCallable() { + return stub.getCertificateAuthorityCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (CertificateAuthority element : certificateAuthorityServiceClient.listCertificateAuthorities(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in + * the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificateAuthoritiesPagedResponse listCertificateAuthorities( + LocationName parent) { + ListCertificateAuthoritiesRequest request = + ListCertificateAuthoritiesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCertificateAuthorities(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (CertificateAuthority element : certificateAuthorityServiceClient.listCertificateAuthorities(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in + * the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(String parent) { + ListCertificateAuthoritiesRequest request = + ListCertificateAuthoritiesRequest.newBuilder().setParent(parent).build(); + return listCertificateAuthorities(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListCertificateAuthoritiesRequest request = ListCertificateAuthoritiesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (CertificateAuthority element : certificateAuthorityServiceClient.listCertificateAuthorities(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificateAuthoritiesPagedResponse listCertificateAuthorities( + ListCertificateAuthoritiesRequest request) { + return listCertificateAuthoritiesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListCertificateAuthoritiesRequest request = ListCertificateAuthoritiesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListCertificateAuthoritiesPagedResponse> future = certificateAuthorityServiceClient.listCertificateAuthoritiesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (CertificateAuthority element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable< + ListCertificateAuthoritiesRequest, ListCertificateAuthoritiesPagedResponse> + listCertificateAuthoritiesPagedCallable() { + return stub.listCertificateAuthoritiesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListCertificateAuthoritiesRequest request = ListCertificateAuthoritiesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListCertificateAuthoritiesResponse response = certificateAuthorityServiceClient.listCertificateAuthoritiesCallable().call(request);
+   *     for (CertificateAuthority element : response.getCertificateAuthoritiesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listCertificateAuthoritiesCallable() { + return stub.listCertificateAuthoritiesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * that is scheduled for deletion. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.restoreCertificateAuthorityAsync(name).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + restoreCertificateAuthorityAsync(CertificateAuthorityName name) { + RestoreCertificateAuthorityRequest request = + RestoreCertificateAuthorityRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return restoreCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * that is scheduled for deletion. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.restoreCertificateAuthorityAsync(name.toString()).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + restoreCertificateAuthorityAsync(String name) { + RestoreCertificateAuthorityRequest request = + RestoreCertificateAuthorityRequest.newBuilder().setName(name).build(); + return restoreCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * that is scheduled for deletion. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   RestoreCertificateAuthorityRequest request = RestoreCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   CertificateAuthority response = certificateAuthorityServiceClient.restoreCertificateAuthorityAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + restoreCertificateAuthorityAsync(RestoreCertificateAuthorityRequest request) { + return restoreCertificateAuthorityOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * that is scheduled for deletion. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   RestoreCertificateAuthorityRequest request = RestoreCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.restoreCertificateAuthorityOperationCallable().futureCall(request);
+   *   // Do something
+   *   CertificateAuthority response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + RestoreCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + restoreCertificateAuthorityOperationCallable() { + return stub.restoreCertificateAuthorityOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * that is scheduled for deletion. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   RestoreCertificateAuthorityRequest request = RestoreCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.restoreCertificateAuthorityCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + restoreCertificateAuthorityCallable() { + return stub.restoreCertificateAuthorityCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * for deletion. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityAsync(name).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + scheduleDeleteCertificateAuthorityAsync(CertificateAuthorityName name) { + ScheduleDeleteCertificateAuthorityRequest request = + ScheduleDeleteCertificateAuthorityRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return scheduleDeleteCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * for deletion. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateAuthority response = certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityAsync(name.toString()).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/*/locations/*/certificateAuthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + scheduleDeleteCertificateAuthorityAsync(String name) { + ScheduleDeleteCertificateAuthorityRequest request = + ScheduleDeleteCertificateAuthorityRequest.newBuilder().setName(name).build(); + return scheduleDeleteCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * for deletion. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   ScheduleDeleteCertificateAuthorityRequest request = ScheduleDeleteCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   CertificateAuthority response = certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + scheduleDeleteCertificateAuthorityAsync(ScheduleDeleteCertificateAuthorityRequest request) { + return scheduleDeleteCertificateAuthorityOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * for deletion. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   ScheduleDeleteCertificateAuthorityRequest request = ScheduleDeleteCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityOperationCallable().futureCall(request);
+   *   // Do something
+   *   CertificateAuthority response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + ScheduleDeleteCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + scheduleDeleteCertificateAuthorityOperationCallable() { + return stub.scheduleDeleteCertificateAuthorityOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * for deletion. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   ScheduleDeleteCertificateAuthorityRequest request = ScheduleDeleteCertificateAuthorityRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + scheduleDeleteCertificateAuthorityCallable() { + return stub.scheduleDeleteCertificateAuthorityCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   CertificateAuthority response = certificateAuthorityServiceClient.updateCertificateAuthorityAsync(certificateAuthority, updateMask).get();
+   * }
+   * 
+ * + * @param certificateAuthority Required. + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with + * updated values. + * @param updateMask Required. A list of fields to be updated in this request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + updateCertificateAuthorityAsync( + CertificateAuthority certificateAuthority, FieldMask updateMask) { + UpdateCertificateAuthorityRequest request = + UpdateCertificateAuthorityRequest.newBuilder() + .setCertificateAuthority(certificateAuthority) + .setUpdateMask(updateMask) + .build(); + return updateCertificateAuthorityAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateCertificateAuthorityRequest request = UpdateCertificateAuthorityRequest.newBuilder()
+   *     .setCertificateAuthority(certificateAuthority)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   CertificateAuthority response = certificateAuthorityServiceClient.updateCertificateAuthorityAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + updateCertificateAuthorityAsync(UpdateCertificateAuthorityRequest request) { + return updateCertificateAuthorityOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateCertificateAuthorityRequest request = UpdateCertificateAuthorityRequest.newBuilder()
+   *     .setCertificateAuthority(certificateAuthority)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.updateCertificateAuthorityOperationCallable().futureCall(request);
+   *   // Do something
+   *   CertificateAuthority response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + UpdateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + updateCertificateAuthorityOperationCallable() { + return stub.updateCertificateAuthorityOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateCertificateAuthorityRequest request = UpdateCertificateAuthorityRequest.newBuilder()
+   *     .setCertificateAuthority(certificateAuthority)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.updateCertificateAuthorityCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + updateCertificateAuthorityCallable() { + return stub.updateCertificateAuthorityCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * in a given Project, Location for a particular + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
+   *   String certificateRevocationListId = "";
+   *   CertificateRevocationList response = certificateAuthorityServiceClient.createCertificateRevocationListAsync(parent, certificateRevocationList, certificateRevocationListId).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location and + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * associated with the + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], + * in the format `projects/*/locations/*/certificateAuthorities/*`. + * @param certificateRevocationList Required. A + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * with initial field values. + * @param certificateRevocationListId Required. It must be unique within a location and match the + * regular expression `[a-zA-Z0-9-]{1,63}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + createCertificateRevocationListAsync( + CertificateAuthorityName parent, + CertificateRevocationList certificateRevocationList, + String certificateRevocationListId) { + CreateCertificateRevocationListRequest request = + CreateCertificateRevocationListRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCertificateRevocationList(certificateRevocationList) + .setCertificateRevocationListId(certificateRevocationListId) + .build(); + return createCertificateRevocationListAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * in a given Project, Location for a particular + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
+   *   String certificateRevocationListId = "";
+   *   CertificateRevocationList response = certificateAuthorityServiceClient.createCertificateRevocationListAsync(parent.toString(), certificateRevocationList, certificateRevocationListId).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location and + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * associated with the + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], + * in the format `projects/*/locations/*/certificateAuthorities/*`. + * @param certificateRevocationList Required. A + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * with initial field values. + * @param certificateRevocationListId Required. It must be unique within a location and match the + * regular expression `[a-zA-Z0-9-]{1,63}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + createCertificateRevocationListAsync( + String parent, + CertificateRevocationList certificateRevocationList, + String certificateRevocationListId) { + CreateCertificateRevocationListRequest request = + CreateCertificateRevocationListRequest.newBuilder() + .setParent(parent) + .setCertificateRevocationList(certificateRevocationList) + .setCertificateRevocationListId(certificateRevocationListId) + .build(); + return createCertificateRevocationListAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * in a given Project, Location for a particular + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   String certificateRevocationListId = "";
+   *   CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
+   *   CreateCertificateRevocationListRequest request = CreateCertificateRevocationListRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setCertificateRevocationListId(certificateRevocationListId)
+   *     .setCertificateRevocationList(certificateRevocationList)
+   *     .build();
+   *   CertificateRevocationList response = certificateAuthorityServiceClient.createCertificateRevocationListAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + createCertificateRevocationListAsync(CreateCertificateRevocationListRequest request) { + return createCertificateRevocationListOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * in a given Project, Location for a particular + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   String certificateRevocationListId = "";
+   *   CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
+   *   CreateCertificateRevocationListRequest request = CreateCertificateRevocationListRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setCertificateRevocationListId(certificateRevocationListId)
+   *     .setCertificateRevocationList(certificateRevocationList)
+   *     .build();
+   *   OperationFuture<CertificateRevocationList, OperationMetadata> future = certificateAuthorityServiceClient.createCertificateRevocationListOperationCallable().futureCall(request);
+   *   // Do something
+   *   CertificateRevocationList response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + createCertificateRevocationListOperationCallable() { + return stub.createCertificateRevocationListOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * in a given Project, Location for a particular + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   String certificateRevocationListId = "";
+   *   CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
+   *   CreateCertificateRevocationListRequest request = CreateCertificateRevocationListRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setCertificateRevocationListId(certificateRevocationListId)
+   *     .setCertificateRevocationList(certificateRevocationList)
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.createCertificateRevocationListCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + createCertificateRevocationListCallable() { + return stub.createCertificateRevocationListCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateRevocationListName name = CertificateRevocationListName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]");
+   *   CertificateRevocationList response = certificateAuthorityServiceClient.getCertificateRevocationList(name);
+   * }
+   * 
+ * + * @param name Required. The + * [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateRevocationList getCertificateRevocationList( + CertificateRevocationListName name) { + GetCertificateRevocationListRequest request = + GetCertificateRevocationListRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getCertificateRevocationList(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateRevocationListName name = CertificateRevocationListName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]");
+   *   CertificateRevocationList response = certificateAuthorityServiceClient.getCertificateRevocationList(name.toString());
+   * }
+   * 
+ * + * @param name Required. The + * [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateRevocationList getCertificateRevocationList(String name) { + GetCertificateRevocationListRequest request = + GetCertificateRevocationListRequest.newBuilder().setName(name).build(); + return getCertificateRevocationList(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateRevocationListName name = CertificateRevocationListName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]");
+   *   GetCertificateRevocationListRequest request = GetCertificateRevocationListRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   CertificateRevocationList response = certificateAuthorityServiceClient.getCertificateRevocationList(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 CertificateRevocationList getCertificateRevocationList( + GetCertificateRevocationListRequest request) { + return getCertificateRevocationListCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateRevocationListName name = CertificateRevocationListName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]");
+   *   GetCertificateRevocationListRequest request = GetCertificateRevocationListRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<CertificateRevocationList> future = certificateAuthorityServiceClient.getCertificateRevocationListCallable().futureCall(request);
+   *   // Do something
+   *   CertificateRevocationList response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + getCertificateRevocationListCallable() { + return stub.getCertificateRevocationListCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists + * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   for (CertificateRevocationList element : certificateAuthorityServiceClient.listCertificateRevocationLists(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], + * in the format `projects/*/locations/*/certificateauthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificateRevocationListsPagedResponse listCertificateRevocationLists( + CertificateAuthorityName parent) { + ListCertificateRevocationListsRequest request = + ListCertificateRevocationListsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCertificateRevocationLists(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists + * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   for (CertificateRevocationList element : certificateAuthorityServiceClient.listCertificateRevocationLists(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], + * in the format `projects/*/locations/*/certificateauthorities/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificateRevocationListsPagedResponse listCertificateRevocationLists( + String parent) { + ListCertificateRevocationListsRequest request = + ListCertificateRevocationListsRequest.newBuilder().setParent(parent).build(); + return listCertificateRevocationLists(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists + * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   ListCertificateRevocationListsRequest request = ListCertificateRevocationListsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (CertificateRevocationList element : certificateAuthorityServiceClient.listCertificateRevocationLists(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificateRevocationListsPagedResponse listCertificateRevocationLists( + ListCertificateRevocationListsRequest request) { + return listCertificateRevocationListsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists + * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   ListCertificateRevocationListsRequest request = ListCertificateRevocationListsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListCertificateRevocationListsPagedResponse> future = certificateAuthorityServiceClient.listCertificateRevocationListsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (CertificateRevocationList element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable< + ListCertificateRevocationListsRequest, ListCertificateRevocationListsPagedResponse> + listCertificateRevocationListsPagedCallable() { + return stub.listCertificateRevocationListsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists + * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+   *   ListCertificateRevocationListsRequest request = ListCertificateRevocationListsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListCertificateRevocationListsResponse response = certificateAuthorityServiceClient.listCertificateRevocationListsCallable().call(request);
+   *     for (CertificateRevocationList element : response.getCertificateRevocationListsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable< + ListCertificateRevocationListsRequest, ListCertificateRevocationListsResponse> + listCertificateRevocationListsCallable() { + return stub.listCertificateRevocationListsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   CertificateRevocationList response = certificateAuthorityServiceClient.updateCertificateRevocationListAsync(certificateRevocationList, updateMask).get();
+   * }
+   * 
+ * + * @param certificateRevocationList Required. + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * with updated values. + * @param updateMask Required. A list of fields to be updated in this request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + updateCertificateRevocationListAsync( + CertificateRevocationList certificateRevocationList, FieldMask updateMask) { + UpdateCertificateRevocationListRequest request = + UpdateCertificateRevocationListRequest.newBuilder() + .setCertificateRevocationList(certificateRevocationList) + .setUpdateMask(updateMask) + .build(); + return updateCertificateRevocationListAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateCertificateRevocationListRequest request = UpdateCertificateRevocationListRequest.newBuilder()
+   *     .setCertificateRevocationList(certificateRevocationList)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   CertificateRevocationList response = certificateAuthorityServiceClient.updateCertificateRevocationListAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + updateCertificateRevocationListAsync(UpdateCertificateRevocationListRequest request) { + return updateCertificateRevocationListOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateCertificateRevocationListRequest request = UpdateCertificateRevocationListRequest.newBuilder()
+   *     .setCertificateRevocationList(certificateRevocationList)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   OperationFuture<CertificateRevocationList, OperationMetadata> future = certificateAuthorityServiceClient.updateCertificateRevocationListOperationCallable().futureCall(request);
+   *   // Do something
+   *   CertificateRevocationList response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + UpdateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + updateCertificateRevocationListOperationCallable() { + return stub.updateCertificateRevocationListOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateCertificateRevocationListRequest request = UpdateCertificateRevocationListRequest.newBuilder()
+   *     .setCertificateRevocationList(certificateRevocationList)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.updateCertificateRevocationListCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + updateCertificateRevocationListCallable() { + return stub.updateCertificateRevocationListCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a + * given Project and Location. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
+   *   String reusableConfigId = "";
+   *   ReusableConfig response = certificateAuthorityServiceClient.createReusableConfigAsync(parent, reusableConfig, reusableConfigId).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format + * `projects/*/locations/*`. + * @param reusableConfig Required. A + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field + * values. + * @param reusableConfigId Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9-]{1,63}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture createReusableConfigAsync( + LocationName parent, ReusableConfig reusableConfig, String reusableConfigId) { + CreateReusableConfigRequest request = + CreateReusableConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setReusableConfig(reusableConfig) + .setReusableConfigId(reusableConfigId) + .build(); + return createReusableConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a + * given Project and Location. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
+   *   String reusableConfigId = "";
+   *   ReusableConfig response = certificateAuthorityServiceClient.createReusableConfigAsync(parent.toString(), reusableConfig, reusableConfigId).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format + * `projects/*/locations/*`. + * @param reusableConfig Required. A + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field + * values. + * @param reusableConfigId Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9-]{1,63}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture createReusableConfigAsync( + String parent, ReusableConfig reusableConfig, String reusableConfigId) { + CreateReusableConfigRequest request = + CreateReusableConfigRequest.newBuilder() + .setParent(parent) + .setReusableConfig(reusableConfig) + .setReusableConfigId(reusableConfigId) + .build(); + return createReusableConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a + * given Project and Location. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String reusableConfigId = "";
+   *   ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
+   *   CreateReusableConfigRequest request = CreateReusableConfigRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setReusableConfigId(reusableConfigId)
+   *     .setReusableConfig(reusableConfig)
+   *     .build();
+   *   ReusableConfig response = certificateAuthorityServiceClient.createReusableConfigAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture createReusableConfigAsync( + CreateReusableConfigRequest request) { + return createReusableConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a + * given Project and Location. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String reusableConfigId = "";
+   *   ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
+   *   CreateReusableConfigRequest request = CreateReusableConfigRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setReusableConfigId(reusableConfigId)
+   *     .setReusableConfig(reusableConfig)
+   *     .build();
+   *   OperationFuture<ReusableConfig, OperationMetadata> future = certificateAuthorityServiceClient.createReusableConfigOperationCallable().futureCall(request);
+   *   // Do something
+   *   ReusableConfig response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + createReusableConfigOperationCallable() { + return stub.createReusableConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a + * given Project and Location. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String reusableConfigId = "";
+   *   ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
+   *   CreateReusableConfigRequest request = CreateReusableConfigRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setReusableConfigId(reusableConfigId)
+   *     .setReusableConfig(reusableConfig)
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.createReusableConfigCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + createReusableConfigCallable() { + return stub.createReusableConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * DeleteReusableConfig deletes a + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
+   *   certificateAuthorityServiceClient.deleteReusableConfigAsync(name).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format + * `projects/*/locations/*/reusableConfigs/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture deleteReusableConfigAsync( + ReusableConfigName name) { + DeleteReusableConfigRequest request = + DeleteReusableConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteReusableConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * DeleteReusableConfig deletes a + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
+   *   certificateAuthorityServiceClient.deleteReusableConfigAsync(name.toString()).get();
+   * }
+   * 
+ * + * @param name Required. The resource name for this + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format + * `projects/*/locations/*/reusableConfigs/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture deleteReusableConfigAsync(String name) { + DeleteReusableConfigRequest request = + DeleteReusableConfigRequest.newBuilder().setName(name).build(); + return deleteReusableConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * DeleteReusableConfig deletes a + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
+   *   DeleteReusableConfigRequest request = DeleteReusableConfigRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   certificateAuthorityServiceClient.deleteReusableConfigAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture deleteReusableConfigAsync( + DeleteReusableConfigRequest request) { + return deleteReusableConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * DeleteReusableConfig deletes a + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
+   *   DeleteReusableConfigRequest request = DeleteReusableConfigRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   OperationFuture<Empty, OperationMetadata> future = certificateAuthorityServiceClient.deleteReusableConfigOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + deleteReusableConfigOperationCallable() { + return stub.deleteReusableConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * DeleteReusableConfig deletes a + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
+   *   DeleteReusableConfigRequest request = DeleteReusableConfigRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.deleteReusableConfigCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + deleteReusableConfigCallable() { + return stub.deleteReusableConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
+   *   ReusableConfig response = certificateAuthorityServiceClient.getReusableConfig(name);
+   * }
+   * 
+ * + * @param name Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReusableConfig getReusableConfig(ReusableConfigName name) { + GetReusableConfigRequest request = + GetReusableConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getReusableConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
+   *   ReusableConfig response = certificateAuthorityServiceClient.getReusableConfig(name.toString());
+   * }
+   * 
+ * + * @param name Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReusableConfig getReusableConfig(String name) { + GetReusableConfigRequest request = GetReusableConfigRequest.newBuilder().setName(name).build(); + return getReusableConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
+   *   GetReusableConfigRequest request = GetReusableConfigRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ReusableConfig response = certificateAuthorityServiceClient.getReusableConfig(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 ReusableConfig getReusableConfig(GetReusableConfigRequest request) { + return getReusableConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
+   *   GetReusableConfigRequest request = GetReusableConfigRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<ReusableConfig> future = certificateAuthorityServiceClient.getReusableConfigCallable().futureCall(request);
+   *   // Do something
+   *   ReusableConfig response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getReusableConfigCallable() { + return stub.getReusableConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (ReusableConfig element : certificateAuthorityServiceClient.listReusableConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format + * `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReusableConfigsPagedResponse listReusableConfigs(LocationName parent) { + ListReusableConfigsRequest request = + ListReusableConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listReusableConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (ReusableConfig element : certificateAuthorityServiceClient.listReusableConfigs(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the location associated with the + * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format + * `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReusableConfigsPagedResponse listReusableConfigs(String parent) { + ListReusableConfigsRequest request = + ListReusableConfigsRequest.newBuilder().setParent(parent).build(); + return listReusableConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListReusableConfigsRequest request = ListReusableConfigsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (ReusableConfig element : certificateAuthorityServiceClient.listReusableConfigs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReusableConfigsPagedResponse listReusableConfigs( + ListReusableConfigsRequest request) { + return listReusableConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListReusableConfigsRequest request = ListReusableConfigsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListReusableConfigsPagedResponse> future = certificateAuthorityServiceClient.listReusableConfigsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (ReusableConfig element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listReusableConfigsPagedCallable() { + return stub.listReusableConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListReusableConfigsRequest request = ListReusableConfigsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListReusableConfigsResponse response = certificateAuthorityServiceClient.listReusableConfigsCallable().call(request);
+   *     for (ReusableConfig element : response.getReusableConfigsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listReusableConfigsCallable() { + return stub.listReusableConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ReusableConfig response = certificateAuthorityServiceClient.updateReusableConfigAsync(reusableConfig, updateMask).get();
+   * }
+   * 
+ * + * @param reusableConfig Required. + * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated + * values. + * @param updateMask Required. A list of fields to be updated in this request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture updateReusableConfigAsync( + ReusableConfig reusableConfig, FieldMask updateMask) { + UpdateReusableConfigRequest request = + UpdateReusableConfigRequest.newBuilder() + .setReusableConfig(reusableConfig) + .setUpdateMask(updateMask) + .build(); + return updateReusableConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateReusableConfigRequest request = UpdateReusableConfigRequest.newBuilder()
+   *     .setReusableConfig(reusableConfig)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   ReusableConfig response = certificateAuthorityServiceClient.updateReusableConfigAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture updateReusableConfigAsync( + UpdateReusableConfigRequest request) { + return updateReusableConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateReusableConfigRequest request = UpdateReusableConfigRequest.newBuilder()
+   *     .setReusableConfig(reusableConfig)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   OperationFuture<ReusableConfig, OperationMetadata> future = certificateAuthorityServiceClient.updateReusableConfigOperationCallable().futureCall(request);
+   *   // Do something
+   *   ReusableConfig response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + updateReusableConfigOperationCallable() { + return stub.updateReusableConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Update a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + * + *

Sample code: + * + *


+   * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+   *   ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateReusableConfigRequest request = UpdateReusableConfigRequest.newBuilder()
+   *     .setReusableConfig(reusableConfig)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   ApiFuture<Operation> future = certificateAuthorityServiceClient.updateReusableConfigCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + updateReusableConfigCallable() { + return stub.updateReusableConfigCallable(); + } + + @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 ListCertificatesPagedResponse + extends AbstractPagedListResponse< + ListCertificatesRequest, + ListCertificatesResponse, + Certificate, + ListCertificatesPage, + ListCertificatesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCertificatesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListCertificatesPagedResponse apply(ListCertificatesPage input) { + return new ListCertificatesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListCertificatesPagedResponse(ListCertificatesPage page) { + super(page, ListCertificatesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCertificatesPage + extends AbstractPage< + ListCertificatesRequest, ListCertificatesResponse, Certificate, ListCertificatesPage> { + + private ListCertificatesPage( + PageContext context, + ListCertificatesResponse response) { + super(context, response); + } + + private static ListCertificatesPage createEmptyPage() { + return new ListCertificatesPage(null, null); + } + + @Override + protected ListCertificatesPage createPage( + PageContext context, + ListCertificatesResponse response) { + return new ListCertificatesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCertificatesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCertificatesRequest, + ListCertificatesResponse, + Certificate, + ListCertificatesPage, + ListCertificatesFixedSizeCollection> { + + private ListCertificatesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCertificatesFixedSizeCollection createEmptyCollection() { + return new ListCertificatesFixedSizeCollection(null, 0); + } + + @Override + protected ListCertificatesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCertificatesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListCertificateAuthoritiesPagedResponse + extends AbstractPagedListResponse< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + CertificateAuthority, + ListCertificateAuthoritiesPage, + ListCertificateAuthoritiesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + CertificateAuthority> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCertificateAuthoritiesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListCertificateAuthoritiesPage, ListCertificateAuthoritiesPagedResponse>() { + @Override + public ListCertificateAuthoritiesPagedResponse apply( + ListCertificateAuthoritiesPage input) { + return new ListCertificateAuthoritiesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListCertificateAuthoritiesPagedResponse(ListCertificateAuthoritiesPage page) { + super(page, ListCertificateAuthoritiesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCertificateAuthoritiesPage + extends AbstractPage< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + CertificateAuthority, + ListCertificateAuthoritiesPage> { + + private ListCertificateAuthoritiesPage( + PageContext< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + CertificateAuthority> + context, + ListCertificateAuthoritiesResponse response) { + super(context, response); + } + + private static ListCertificateAuthoritiesPage createEmptyPage() { + return new ListCertificateAuthoritiesPage(null, null); + } + + @Override + protected ListCertificateAuthoritiesPage createPage( + PageContext< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + CertificateAuthority> + context, + ListCertificateAuthoritiesResponse response) { + return new ListCertificateAuthoritiesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + CertificateAuthority> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCertificateAuthoritiesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + CertificateAuthority, + ListCertificateAuthoritiesPage, + ListCertificateAuthoritiesFixedSizeCollection> { + + private ListCertificateAuthoritiesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCertificateAuthoritiesFixedSizeCollection createEmptyCollection() { + return new ListCertificateAuthoritiesFixedSizeCollection(null, 0); + } + + @Override + protected ListCertificateAuthoritiesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCertificateAuthoritiesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListCertificateRevocationListsPagedResponse + extends AbstractPagedListResponse< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + CertificateRevocationList, + ListCertificateRevocationListsPage, + ListCertificateRevocationListsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + CertificateRevocationList> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCertificateRevocationListsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListCertificateRevocationListsPage, ListCertificateRevocationListsPagedResponse>() { + @Override + public ListCertificateRevocationListsPagedResponse apply( + ListCertificateRevocationListsPage input) { + return new ListCertificateRevocationListsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListCertificateRevocationListsPagedResponse(ListCertificateRevocationListsPage page) { + super(page, ListCertificateRevocationListsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCertificateRevocationListsPage + extends AbstractPage< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + CertificateRevocationList, + ListCertificateRevocationListsPage> { + + private ListCertificateRevocationListsPage( + PageContext< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + CertificateRevocationList> + context, + ListCertificateRevocationListsResponse response) { + super(context, response); + } + + private static ListCertificateRevocationListsPage createEmptyPage() { + return new ListCertificateRevocationListsPage(null, null); + } + + @Override + protected ListCertificateRevocationListsPage createPage( + PageContext< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + CertificateRevocationList> + context, + ListCertificateRevocationListsResponse response) { + return new ListCertificateRevocationListsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + CertificateRevocationList> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCertificateRevocationListsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + CertificateRevocationList, + ListCertificateRevocationListsPage, + ListCertificateRevocationListsFixedSizeCollection> { + + private ListCertificateRevocationListsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCertificateRevocationListsFixedSizeCollection createEmptyCollection() { + return new ListCertificateRevocationListsFixedSizeCollection(null, 0); + } + + @Override + protected ListCertificateRevocationListsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCertificateRevocationListsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListReusableConfigsPagedResponse + extends AbstractPagedListResponse< + ListReusableConfigsRequest, + ListReusableConfigsResponse, + ReusableConfig, + ListReusableConfigsPage, + ListReusableConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListReusableConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListReusableConfigsPagedResponse apply(ListReusableConfigsPage input) { + return new ListReusableConfigsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListReusableConfigsPagedResponse(ListReusableConfigsPage page) { + super(page, ListReusableConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListReusableConfigsPage + extends AbstractPage< + ListReusableConfigsRequest, + ListReusableConfigsResponse, + ReusableConfig, + ListReusableConfigsPage> { + + private ListReusableConfigsPage( + PageContext + context, + ListReusableConfigsResponse response) { + super(context, response); + } + + private static ListReusableConfigsPage createEmptyPage() { + return new ListReusableConfigsPage(null, null); + } + + @Override + protected ListReusableConfigsPage createPage( + PageContext + context, + ListReusableConfigsResponse response) { + return new ListReusableConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListReusableConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListReusableConfigsRequest, + ListReusableConfigsResponse, + ReusableConfig, + ListReusableConfigsPage, + ListReusableConfigsFixedSizeCollection> { + + private ListReusableConfigsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListReusableConfigsFixedSizeCollection createEmptyCollection() { + return new ListReusableConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListReusableConfigsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListReusableConfigsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceSettings.java b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceSettings.java new file mode 100644 index 00000000..55edd864 --- /dev/null +++ b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceSettings.java @@ -0,0 +1,729 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1; + +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificatesPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse; + +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.security.privateca.v1beta1.stub.CertificateAuthorityServiceStubSettings; +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 CertificateAuthorityServiceClient}. + * + *

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

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

+ * 
+ * CertificateAuthorityServiceSettings.Builder certificateAuthorityServiceSettingsBuilder =
+ *     CertificateAuthorityServiceSettings.newBuilder();
+ * certificateAuthorityServiceSettingsBuilder
+ *     .createCertificateSettings()
+ *     .setRetrySettings(
+ *         certificateAuthorityServiceSettingsBuilder.createCertificateSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CertificateAuthorityServiceSettings certificateAuthorityServiceSettings = certificateAuthorityServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CertificateAuthorityServiceSettings + extends ClientSettings { + /** Returns the object with the settings used for calls to createCertificate. */ + public UnaryCallSettings createCertificateSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .createCertificateSettings(); + } + + /** Returns the object with the settings used for calls to getCertificate. */ + public UnaryCallSettings getCertificateSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()).getCertificateSettings(); + } + + /** Returns the object with the settings used for calls to listCertificates. */ + public PagedCallSettings< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()).listCertificatesSettings(); + } + + /** Returns the object with the settings used for calls to revokeCertificate. */ + public UnaryCallSettings revokeCertificateSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .revokeCertificateSettings(); + } + + /** Returns the object with the settings used for calls to updateCertificate. */ + public UnaryCallSettings updateCertificateSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .updateCertificateSettings(); + } + + /** Returns the object with the settings used for calls to activateCertificateAuthority. */ + public UnaryCallSettings + activateCertificateAuthoritySettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .activateCertificateAuthoritySettings(); + } + + /** Returns the object with the settings used for calls to activateCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + ActivateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + activateCertificateAuthorityOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .activateCertificateAuthorityOperationSettings(); + } + + /** Returns the object with the settings used for calls to createCertificateAuthority. */ + public UnaryCallSettings + createCertificateAuthoritySettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .createCertificateAuthoritySettings(); + } + + /** Returns the object with the settings used for calls to createCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + CreateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + createCertificateAuthorityOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .createCertificateAuthorityOperationSettings(); + } + + /** Returns the object with the settings used for calls to disableCertificateAuthority. */ + public UnaryCallSettings + disableCertificateAuthoritySettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .disableCertificateAuthoritySettings(); + } + + /** Returns the object with the settings used for calls to disableCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + DisableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + disableCertificateAuthorityOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .disableCertificateAuthorityOperationSettings(); + } + + /** Returns the object with the settings used for calls to enableCertificateAuthority. */ + public UnaryCallSettings + enableCertificateAuthoritySettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .enableCertificateAuthoritySettings(); + } + + /** Returns the object with the settings used for calls to enableCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + EnableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + enableCertificateAuthorityOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .enableCertificateAuthorityOperationSettings(); + } + + /** Returns the object with the settings used for calls to fetchCertificateAuthorityCsr. */ + public UnaryCallSettings< + FetchCertificateAuthorityCsrRequest, FetchCertificateAuthorityCsrResponse> + fetchCertificateAuthorityCsrSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .fetchCertificateAuthorityCsrSettings(); + } + + /** Returns the object with the settings used for calls to getCertificateAuthority. */ + public UnaryCallSettings + getCertificateAuthoritySettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .getCertificateAuthoritySettings(); + } + + /** Returns the object with the settings used for calls to listCertificateAuthorities. */ + public PagedCallSettings< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + ListCertificateAuthoritiesPagedResponse> + listCertificateAuthoritiesSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .listCertificateAuthoritiesSettings(); + } + + /** Returns the object with the settings used for calls to restoreCertificateAuthority. */ + public UnaryCallSettings + restoreCertificateAuthoritySettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .restoreCertificateAuthoritySettings(); + } + + /** Returns the object with the settings used for calls to restoreCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + RestoreCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + restoreCertificateAuthorityOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .restoreCertificateAuthorityOperationSettings(); + } + + /** Returns the object with the settings used for calls to scheduleDeleteCertificateAuthority. */ + public UnaryCallSettings + scheduleDeleteCertificateAuthoritySettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .scheduleDeleteCertificateAuthoritySettings(); + } + + /** Returns the object with the settings used for calls to scheduleDeleteCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + ScheduleDeleteCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + scheduleDeleteCertificateAuthorityOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .scheduleDeleteCertificateAuthorityOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateCertificateAuthority. */ + public UnaryCallSettings + updateCertificateAuthoritySettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .updateCertificateAuthoritySettings(); + } + + /** Returns the object with the settings used for calls to updateCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + UpdateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + updateCertificateAuthorityOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .updateCertificateAuthorityOperationSettings(); + } + + /** Returns the object with the settings used for calls to createCertificateRevocationList. */ + public UnaryCallSettings + createCertificateRevocationListSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .createCertificateRevocationListSettings(); + } + + /** Returns the object with the settings used for calls to createCertificateRevocationList. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + createCertificateRevocationListOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .createCertificateRevocationListOperationSettings(); + } + + /** Returns the object with the settings used for calls to getCertificateRevocationList. */ + public UnaryCallSettings + getCertificateRevocationListSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .getCertificateRevocationListSettings(); + } + + /** Returns the object with the settings used for calls to listCertificateRevocationLists. */ + public PagedCallSettings< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + ListCertificateRevocationListsPagedResponse> + listCertificateRevocationListsSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .listCertificateRevocationListsSettings(); + } + + /** Returns the object with the settings used for calls to updateCertificateRevocationList. */ + public UnaryCallSettings + updateCertificateRevocationListSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .updateCertificateRevocationListSettings(); + } + + /** Returns the object with the settings used for calls to updateCertificateRevocationList. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + UpdateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + updateCertificateRevocationListOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .updateCertificateRevocationListOperationSettings(); + } + + /** Returns the object with the settings used for calls to createReusableConfig. */ + public UnaryCallSettings createReusableConfigSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .createReusableConfigSettings(); + } + + /** Returns the object with the settings used for calls to createReusableConfig. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + createReusableConfigOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .createReusableConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteReusableConfig. */ + public UnaryCallSettings deleteReusableConfigSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .deleteReusableConfigSettings(); + } + + /** Returns the object with the settings used for calls to deleteReusableConfig. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + deleteReusableConfigOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .deleteReusableConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to getReusableConfig. */ + public UnaryCallSettings getReusableConfigSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .getReusableConfigSettings(); + } + + /** Returns the object with the settings used for calls to listReusableConfigs. */ + public PagedCallSettings< + ListReusableConfigsRequest, ListReusableConfigsResponse, ListReusableConfigsPagedResponse> + listReusableConfigsSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .listReusableConfigsSettings(); + } + + /** Returns the object with the settings used for calls to updateReusableConfig. */ + public UnaryCallSettings updateReusableConfigSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .updateReusableConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateReusableConfig. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + updateReusableConfigOperationSettings() { + return ((CertificateAuthorityServiceStubSettings) getStubSettings()) + .updateReusableConfigOperationSettings(); + } + + public static final CertificateAuthorityServiceSettings create( + CertificateAuthorityServiceStubSettings stub) throws IOException { + return new CertificateAuthorityServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CertificateAuthorityServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CertificateAuthorityServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CertificateAuthorityServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CertificateAuthorityServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CertificateAuthorityServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CertificateAuthorityServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CertificateAuthorityServiceStubSettings.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 CertificateAuthorityServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CertificateAuthorityServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(CertificateAuthorityServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(CertificateAuthorityServiceStubSettings.newBuilder()); + } + + protected Builder(CertificateAuthorityServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CertificateAuthorityServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public CertificateAuthorityServiceStubSettings.Builder getStubSettingsBuilder() { + return ((CertificateAuthorityServiceStubSettings.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 createCertificate. */ + public UnaryCallSettings.Builder + createCertificateSettings() { + return getStubSettingsBuilder().createCertificateSettings(); + } + + /** Returns the builder for the settings used for calls to getCertificate. */ + public UnaryCallSettings.Builder getCertificateSettings() { + return getStubSettingsBuilder().getCertificateSettings(); + } + + /** Returns the builder for the settings used for calls to listCertificates. */ + public PagedCallSettings.Builder< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings() { + return getStubSettingsBuilder().listCertificatesSettings(); + } + + /** Returns the builder for the settings used for calls to revokeCertificate. */ + public UnaryCallSettings.Builder + revokeCertificateSettings() { + return getStubSettingsBuilder().revokeCertificateSettings(); + } + + /** Returns the builder for the settings used for calls to updateCertificate. */ + public UnaryCallSettings.Builder + updateCertificateSettings() { + return getStubSettingsBuilder().updateCertificateSettings(); + } + + /** Returns the builder for the settings used for calls to activateCertificateAuthority. */ + public UnaryCallSettings.Builder + activateCertificateAuthoritySettings() { + return getStubSettingsBuilder().activateCertificateAuthoritySettings(); + } + + /** Returns the builder for the settings used for calls to activateCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ActivateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + activateCertificateAuthorityOperationSettings() { + return getStubSettingsBuilder().activateCertificateAuthorityOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createCertificateAuthority. */ + public UnaryCallSettings.Builder + createCertificateAuthoritySettings() { + return getStubSettingsBuilder().createCertificateAuthoritySettings(); + } + + /** Returns the builder for the settings used for calls to createCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + createCertificateAuthorityOperationSettings() { + return getStubSettingsBuilder().createCertificateAuthorityOperationSettings(); + } + + /** Returns the builder for the settings used for calls to disableCertificateAuthority. */ + public UnaryCallSettings.Builder + disableCertificateAuthoritySettings() { + return getStubSettingsBuilder().disableCertificateAuthoritySettings(); + } + + /** Returns the builder for the settings used for calls to disableCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DisableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + disableCertificateAuthorityOperationSettings() { + return getStubSettingsBuilder().disableCertificateAuthorityOperationSettings(); + } + + /** Returns the builder for the settings used for calls to enableCertificateAuthority. */ + public UnaryCallSettings.Builder + enableCertificateAuthoritySettings() { + return getStubSettingsBuilder().enableCertificateAuthoritySettings(); + } + + /** Returns the builder for the settings used for calls to enableCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + EnableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + enableCertificateAuthorityOperationSettings() { + return getStubSettingsBuilder().enableCertificateAuthorityOperationSettings(); + } + + /** Returns the builder for the settings used for calls to fetchCertificateAuthorityCsr. */ + public UnaryCallSettings.Builder< + FetchCertificateAuthorityCsrRequest, FetchCertificateAuthorityCsrResponse> + fetchCertificateAuthorityCsrSettings() { + return getStubSettingsBuilder().fetchCertificateAuthorityCsrSettings(); + } + + /** Returns the builder for the settings used for calls to getCertificateAuthority. */ + public UnaryCallSettings.Builder + getCertificateAuthoritySettings() { + return getStubSettingsBuilder().getCertificateAuthoritySettings(); + } + + /** Returns the builder for the settings used for calls to listCertificateAuthorities. */ + public PagedCallSettings.Builder< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + ListCertificateAuthoritiesPagedResponse> + listCertificateAuthoritiesSettings() { + return getStubSettingsBuilder().listCertificateAuthoritiesSettings(); + } + + /** Returns the builder for the settings used for calls to restoreCertificateAuthority. */ + public UnaryCallSettings.Builder + restoreCertificateAuthoritySettings() { + return getStubSettingsBuilder().restoreCertificateAuthoritySettings(); + } + + /** Returns the builder for the settings used for calls to restoreCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + RestoreCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + restoreCertificateAuthorityOperationSettings() { + return getStubSettingsBuilder().restoreCertificateAuthorityOperationSettings(); + } + + /** + * Returns the builder for the settings used for calls to scheduleDeleteCertificateAuthority. + */ + public UnaryCallSettings.Builder + scheduleDeleteCertificateAuthoritySettings() { + return getStubSettingsBuilder().scheduleDeleteCertificateAuthoritySettings(); + } + + /** + * Returns the builder for the settings used for calls to scheduleDeleteCertificateAuthority. + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ScheduleDeleteCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + scheduleDeleteCertificateAuthorityOperationSettings() { + return getStubSettingsBuilder().scheduleDeleteCertificateAuthorityOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateCertificateAuthority. */ + public UnaryCallSettings.Builder + updateCertificateAuthoritySettings() { + return getStubSettingsBuilder().updateCertificateAuthoritySettings(); + } + + /** Returns the builder for the settings used for calls to updateCertificateAuthority. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + updateCertificateAuthorityOperationSettings() { + return getStubSettingsBuilder().updateCertificateAuthorityOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createCertificateRevocationList. */ + public UnaryCallSettings.Builder + createCertificateRevocationListSettings() { + return getStubSettingsBuilder().createCertificateRevocationListSettings(); + } + + /** Returns the builder for the settings used for calls to createCertificateRevocationList. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + createCertificateRevocationListOperationSettings() { + return getStubSettingsBuilder().createCertificateRevocationListOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getCertificateRevocationList. */ + public UnaryCallSettings.Builder + getCertificateRevocationListSettings() { + return getStubSettingsBuilder().getCertificateRevocationListSettings(); + } + + /** Returns the builder for the settings used for calls to listCertificateRevocationLists. */ + public PagedCallSettings.Builder< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + ListCertificateRevocationListsPagedResponse> + listCertificateRevocationListsSettings() { + return getStubSettingsBuilder().listCertificateRevocationListsSettings(); + } + + /** Returns the builder for the settings used for calls to updateCertificateRevocationList. */ + public UnaryCallSettings.Builder + updateCertificateRevocationListSettings() { + return getStubSettingsBuilder().updateCertificateRevocationListSettings(); + } + + /** Returns the builder for the settings used for calls to updateCertificateRevocationList. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + updateCertificateRevocationListOperationSettings() { + return getStubSettingsBuilder().updateCertificateRevocationListOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createReusableConfig. */ + public UnaryCallSettings.Builder + createReusableConfigSettings() { + return getStubSettingsBuilder().createReusableConfigSettings(); + } + + /** Returns the builder for the settings used for calls to createReusableConfig. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateReusableConfigRequest, ReusableConfig, OperationMetadata> + createReusableConfigOperationSettings() { + return getStubSettingsBuilder().createReusableConfigOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteReusableConfig. */ + public UnaryCallSettings.Builder + deleteReusableConfigSettings() { + return getStubSettingsBuilder().deleteReusableConfigSettings(); + } + + /** Returns the builder for the settings used for calls to deleteReusableConfig. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteReusableConfigOperationSettings() { + return getStubSettingsBuilder().deleteReusableConfigOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getReusableConfig. */ + public UnaryCallSettings.Builder + getReusableConfigSettings() { + return getStubSettingsBuilder().getReusableConfigSettings(); + } + + /** Returns the builder for the settings used for calls to listReusableConfigs. */ + public PagedCallSettings.Builder< + ListReusableConfigsRequest, + ListReusableConfigsResponse, + ListReusableConfigsPagedResponse> + listReusableConfigsSettings() { + return getStubSettingsBuilder().listReusableConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to updateReusableConfig. */ + public UnaryCallSettings.Builder + updateReusableConfigSettings() { + return getStubSettingsBuilder().updateReusableConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateReusableConfig. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateReusableConfigRequest, ReusableConfig, OperationMetadata> + updateReusableConfigOperationSettings() { + return getStubSettingsBuilder().updateReusableConfigOperationSettings(); + } + + @Override + public CertificateAuthorityServiceSettings build() throws IOException { + return new CertificateAuthorityServiceSettings(this); + } + } +} diff --git a/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/package-info.java b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/package-info.java new file mode 100644 index 00000000..424a80de --- /dev/null +++ b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/package-info.java @@ -0,0 +1,45 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Certificate Authority API. + * + *

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

================================= CertificateAuthorityServiceClient + * ================================= + * + *

Service Description: [Certificate Authority + * Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private + * certificate authorities and issued certificates. + * + *

Sample for CertificateAuthorityServiceClient: + * + *

+ * 
+ * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
+ *   CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
+ *   Certificate certificate = Certificate.newBuilder().build();
+ *   String certificateId = "";
+ *   Certificate response = certificateAuthorityServiceClient.createCertificate(parent, certificate, certificateId);
+ * }
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +package com.google.cloud.security.privateca.v1beta1; + +import javax.annotation.Generated; diff --git a/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/CertificateAuthorityServiceStub.java b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/CertificateAuthorityServiceStub.java new file mode 100644 index 00000000..78a11693 --- /dev/null +++ b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/CertificateAuthorityServiceStub.java @@ -0,0 +1,325 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1.stub; + +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificatesPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.Certificate; +import com.google.cloud.security.privateca.v1beta1.CertificateAuthority; +import com.google.cloud.security.privateca.v1beta1.CertificateRevocationList; +import com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest; +import com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest; +import com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest; +import com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest; +import com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse; +import com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.GetCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest; +import com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse; +import com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse; +import com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse; +import com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest; +import com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse; +import com.google.cloud.security.privateca.v1beta1.OperationMetadata; +import com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.ReusableConfig; +import com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest; +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 Certificate Authority API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class CertificateAuthorityServiceStub implements BackgroundResource { + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable createCertificateCallable() { + throw new UnsupportedOperationException("Not implemented: createCertificateCallable()"); + } + + public UnaryCallable getCertificateCallable() { + throw new UnsupportedOperationException("Not implemented: getCertificateCallable()"); + } + + public UnaryCallable + listCertificatesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCertificatesPagedCallable()"); + } + + public UnaryCallable + listCertificatesCallable() { + throw new UnsupportedOperationException("Not implemented: listCertificatesCallable()"); + } + + public UnaryCallable revokeCertificateCallable() { + throw new UnsupportedOperationException("Not implemented: revokeCertificateCallable()"); + } + + public UnaryCallable updateCertificateCallable() { + throw new UnsupportedOperationException("Not implemented: updateCertificateCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ActivateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + activateCertificateAuthorityOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: activateCertificateAuthorityOperationCallable()"); + } + + public UnaryCallable + activateCertificateAuthorityCallable() { + throw new UnsupportedOperationException( + "Not implemented: activateCertificateAuthorityCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + CreateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + createCertificateAuthorityOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createCertificateAuthorityOperationCallable()"); + } + + public UnaryCallable + createCertificateAuthorityCallable() { + throw new UnsupportedOperationException( + "Not implemented: createCertificateAuthorityCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + DisableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + disableCertificateAuthorityOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: disableCertificateAuthorityOperationCallable()"); + } + + public UnaryCallable + disableCertificateAuthorityCallable() { + throw new UnsupportedOperationException( + "Not implemented: disableCertificateAuthorityCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + EnableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + enableCertificateAuthorityOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: enableCertificateAuthorityOperationCallable()"); + } + + public UnaryCallable + enableCertificateAuthorityCallable() { + throw new UnsupportedOperationException( + "Not implemented: enableCertificateAuthorityCallable()"); + } + + public UnaryCallable + fetchCertificateAuthorityCsrCallable() { + throw new UnsupportedOperationException( + "Not implemented: fetchCertificateAuthorityCsrCallable()"); + } + + public UnaryCallable + getCertificateAuthorityCallable() { + throw new UnsupportedOperationException("Not implemented: getCertificateAuthorityCallable()"); + } + + public UnaryCallable + listCertificateAuthoritiesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listCertificateAuthoritiesPagedCallable()"); + } + + public UnaryCallable + listCertificateAuthoritiesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listCertificateAuthoritiesCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + RestoreCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + restoreCertificateAuthorityOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: restoreCertificateAuthorityOperationCallable()"); + } + + public UnaryCallable + restoreCertificateAuthorityCallable() { + throw new UnsupportedOperationException( + "Not implemented: restoreCertificateAuthorityCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ScheduleDeleteCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + scheduleDeleteCertificateAuthorityOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: scheduleDeleteCertificateAuthorityOperationCallable()"); + } + + public UnaryCallable + scheduleDeleteCertificateAuthorityCallable() { + throw new UnsupportedOperationException( + "Not implemented: scheduleDeleteCertificateAuthorityCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + UpdateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + updateCertificateAuthorityOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateCertificateAuthorityOperationCallable()"); + } + + public UnaryCallable + updateCertificateAuthorityCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateCertificateAuthorityCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + createCertificateRevocationListOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createCertificateRevocationListOperationCallable()"); + } + + public UnaryCallable + createCertificateRevocationListCallable() { + throw new UnsupportedOperationException( + "Not implemented: createCertificateRevocationListCallable()"); + } + + public UnaryCallable + getCertificateRevocationListCallable() { + throw new UnsupportedOperationException( + "Not implemented: getCertificateRevocationListCallable()"); + } + + public UnaryCallable< + ListCertificateRevocationListsRequest, ListCertificateRevocationListsPagedResponse> + listCertificateRevocationListsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listCertificateRevocationListsPagedCallable()"); + } + + public UnaryCallable< + ListCertificateRevocationListsRequest, ListCertificateRevocationListsResponse> + listCertificateRevocationListsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listCertificateRevocationListsCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + UpdateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + updateCertificateRevocationListOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateCertificateRevocationListOperationCallable()"); + } + + public UnaryCallable + updateCertificateRevocationListCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateCertificateRevocationListCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + createReusableConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createReusableConfigOperationCallable()"); + } + + public UnaryCallable createReusableConfigCallable() { + throw new UnsupportedOperationException("Not implemented: createReusableConfigCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + deleteReusableConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteReusableConfigOperationCallable()"); + } + + public UnaryCallable deleteReusableConfigCallable() { + throw new UnsupportedOperationException("Not implemented: deleteReusableConfigCallable()"); + } + + public UnaryCallable getReusableConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getReusableConfigCallable()"); + } + + public UnaryCallable + listReusableConfigsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listReusableConfigsPagedCallable()"); + } + + public UnaryCallable + listReusableConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listReusableConfigsCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + updateReusableConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateReusableConfigOperationCallable()"); + } + + public UnaryCallable updateReusableConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateReusableConfigCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/CertificateAuthorityServiceStubSettings.java b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/CertificateAuthorityServiceStubSettings.java new file mode 100644 index 00000000..d7232aee --- /dev/null +++ b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/CertificateAuthorityServiceStubSettings.java @@ -0,0 +1,1919 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1.stub; + +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificatesPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse; + +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.security.privateca.v1beta1.ActivateCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.Certificate; +import com.google.cloud.security.privateca.v1beta1.CertificateAuthority; +import com.google.cloud.security.privateca.v1beta1.CertificateRevocationList; +import com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest; +import com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest; +import com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest; +import com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest; +import com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse; +import com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.GetCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest; +import com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse; +import com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse; +import com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse; +import com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest; +import com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse; +import com.google.cloud.security.privateca.v1beta1.OperationMetadata; +import com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.ReusableConfig; +import com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest; +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 CertificateAuthorityServiceStub}. + * + *

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

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

+ * 
+ * CertificateAuthorityServiceStubSettings.Builder certificateAuthorityServiceSettingsBuilder =
+ *     CertificateAuthorityServiceStubSettings.newBuilder();
+ * certificateAuthorityServiceSettingsBuilder
+ *     .createCertificateSettings()
+ *     .setRetrySettings(
+ *         certificateAuthorityServiceSettingsBuilder.createCertificateSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CertificateAuthorityServiceStubSettings certificateAuthorityServiceSettings = certificateAuthorityServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CertificateAuthorityServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createCertificateSettings; + private final UnaryCallSettings getCertificateSettings; + private final PagedCallSettings< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings; + private final UnaryCallSettings revokeCertificateSettings; + private final UnaryCallSettings updateCertificateSettings; + private final UnaryCallSettings + activateCertificateAuthoritySettings; + private final OperationCallSettings< + ActivateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + activateCertificateAuthorityOperationSettings; + private final UnaryCallSettings + createCertificateAuthoritySettings; + private final OperationCallSettings< + CreateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + createCertificateAuthorityOperationSettings; + private final UnaryCallSettings + disableCertificateAuthoritySettings; + private final OperationCallSettings< + DisableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + disableCertificateAuthorityOperationSettings; + private final UnaryCallSettings + enableCertificateAuthoritySettings; + private final OperationCallSettings< + EnableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + enableCertificateAuthorityOperationSettings; + private final UnaryCallSettings< + FetchCertificateAuthorityCsrRequest, FetchCertificateAuthorityCsrResponse> + fetchCertificateAuthorityCsrSettings; + private final UnaryCallSettings + getCertificateAuthoritySettings; + private final PagedCallSettings< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + ListCertificateAuthoritiesPagedResponse> + listCertificateAuthoritiesSettings; + private final UnaryCallSettings + restoreCertificateAuthoritySettings; + private final OperationCallSettings< + RestoreCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + restoreCertificateAuthorityOperationSettings; + private final UnaryCallSettings + scheduleDeleteCertificateAuthoritySettings; + private final OperationCallSettings< + ScheduleDeleteCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + scheduleDeleteCertificateAuthorityOperationSettings; + private final UnaryCallSettings + updateCertificateAuthoritySettings; + private final OperationCallSettings< + UpdateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + updateCertificateAuthorityOperationSettings; + private final UnaryCallSettings + createCertificateRevocationListSettings; + private final OperationCallSettings< + CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + createCertificateRevocationListOperationSettings; + private final UnaryCallSettings + getCertificateRevocationListSettings; + private final PagedCallSettings< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + ListCertificateRevocationListsPagedResponse> + listCertificateRevocationListsSettings; + private final UnaryCallSettings + updateCertificateRevocationListSettings; + private final OperationCallSettings< + UpdateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + updateCertificateRevocationListOperationSettings; + private final UnaryCallSettings + createReusableConfigSettings; + private final OperationCallSettings< + CreateReusableConfigRequest, ReusableConfig, OperationMetadata> + createReusableConfigOperationSettings; + private final UnaryCallSettings + deleteReusableConfigSettings; + private final OperationCallSettings + deleteReusableConfigOperationSettings; + private final UnaryCallSettings + getReusableConfigSettings; + private final PagedCallSettings< + ListReusableConfigsRequest, ListReusableConfigsResponse, ListReusableConfigsPagedResponse> + listReusableConfigsSettings; + private final UnaryCallSettings + updateReusableConfigSettings; + private final OperationCallSettings< + UpdateReusableConfigRequest, ReusableConfig, OperationMetadata> + updateReusableConfigOperationSettings; + + /** Returns the object with the settings used for calls to createCertificate. */ + public UnaryCallSettings createCertificateSettings() { + return createCertificateSettings; + } + + /** Returns the object with the settings used for calls to getCertificate. */ + public UnaryCallSettings getCertificateSettings() { + return getCertificateSettings; + } + + /** Returns the object with the settings used for calls to listCertificates. */ + public PagedCallSettings< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings() { + return listCertificatesSettings; + } + + /** Returns the object with the settings used for calls to revokeCertificate. */ + public UnaryCallSettings revokeCertificateSettings() { + return revokeCertificateSettings; + } + + /** Returns the object with the settings used for calls to updateCertificate. */ + public UnaryCallSettings updateCertificateSettings() { + return updateCertificateSettings; + } + + /** Returns the object with the settings used for calls to activateCertificateAuthority. */ + public UnaryCallSettings + activateCertificateAuthoritySettings() { + return activateCertificateAuthoritySettings; + } + + /** Returns the object with the settings used for calls to activateCertificateAuthority. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + ActivateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + activateCertificateAuthorityOperationSettings() { + return activateCertificateAuthorityOperationSettings; + } + + /** Returns the object with the settings used for calls to createCertificateAuthority. */ + public UnaryCallSettings + createCertificateAuthoritySettings() { + return createCertificateAuthoritySettings; + } + + /** Returns the object with the settings used for calls to createCertificateAuthority. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + CreateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + createCertificateAuthorityOperationSettings() { + return createCertificateAuthorityOperationSettings; + } + + /** Returns the object with the settings used for calls to disableCertificateAuthority. */ + public UnaryCallSettings + disableCertificateAuthoritySettings() { + return disableCertificateAuthoritySettings; + } + + /** Returns the object with the settings used for calls to disableCertificateAuthority. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + DisableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + disableCertificateAuthorityOperationSettings() { + return disableCertificateAuthorityOperationSettings; + } + + /** Returns the object with the settings used for calls to enableCertificateAuthority. */ + public UnaryCallSettings + enableCertificateAuthoritySettings() { + return enableCertificateAuthoritySettings; + } + + /** Returns the object with the settings used for calls to enableCertificateAuthority. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + EnableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + enableCertificateAuthorityOperationSettings() { + return enableCertificateAuthorityOperationSettings; + } + + /** Returns the object with the settings used for calls to fetchCertificateAuthorityCsr. */ + public UnaryCallSettings< + FetchCertificateAuthorityCsrRequest, FetchCertificateAuthorityCsrResponse> + fetchCertificateAuthorityCsrSettings() { + return fetchCertificateAuthorityCsrSettings; + } + + /** Returns the object with the settings used for calls to getCertificateAuthority. */ + public UnaryCallSettings + getCertificateAuthoritySettings() { + return getCertificateAuthoritySettings; + } + + /** Returns the object with the settings used for calls to listCertificateAuthorities. */ + public PagedCallSettings< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + ListCertificateAuthoritiesPagedResponse> + listCertificateAuthoritiesSettings() { + return listCertificateAuthoritiesSettings; + } + + /** Returns the object with the settings used for calls to restoreCertificateAuthority. */ + public UnaryCallSettings + restoreCertificateAuthoritySettings() { + return restoreCertificateAuthoritySettings; + } + + /** Returns the object with the settings used for calls to restoreCertificateAuthority. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + RestoreCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + restoreCertificateAuthorityOperationSettings() { + return restoreCertificateAuthorityOperationSettings; + } + + /** Returns the object with the settings used for calls to scheduleDeleteCertificateAuthority. */ + public UnaryCallSettings + scheduleDeleteCertificateAuthoritySettings() { + return scheduleDeleteCertificateAuthoritySettings; + } + + /** Returns the object with the settings used for calls to scheduleDeleteCertificateAuthority. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + ScheduleDeleteCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + scheduleDeleteCertificateAuthorityOperationSettings() { + return scheduleDeleteCertificateAuthorityOperationSettings; + } + + /** Returns the object with the settings used for calls to updateCertificateAuthority. */ + public UnaryCallSettings + updateCertificateAuthoritySettings() { + return updateCertificateAuthoritySettings; + } + + /** Returns the object with the settings used for calls to updateCertificateAuthority. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + UpdateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + updateCertificateAuthorityOperationSettings() { + return updateCertificateAuthorityOperationSettings; + } + + /** Returns the object with the settings used for calls to createCertificateRevocationList. */ + public UnaryCallSettings + createCertificateRevocationListSettings() { + return createCertificateRevocationListSettings; + } + + /** Returns the object with the settings used for calls to createCertificateRevocationList. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + createCertificateRevocationListOperationSettings() { + return createCertificateRevocationListOperationSettings; + } + + /** Returns the object with the settings used for calls to getCertificateRevocationList. */ + public UnaryCallSettings + getCertificateRevocationListSettings() { + return getCertificateRevocationListSettings; + } + + /** Returns the object with the settings used for calls to listCertificateRevocationLists. */ + public PagedCallSettings< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + ListCertificateRevocationListsPagedResponse> + listCertificateRevocationListsSettings() { + return listCertificateRevocationListsSettings; + } + + /** Returns the object with the settings used for calls to updateCertificateRevocationList. */ + public UnaryCallSettings + updateCertificateRevocationListSettings() { + return updateCertificateRevocationListSettings; + } + + /** Returns the object with the settings used for calls to updateCertificateRevocationList. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + UpdateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + updateCertificateRevocationListOperationSettings() { + return updateCertificateRevocationListOperationSettings; + } + + /** Returns the object with the settings used for calls to createReusableConfig. */ + public UnaryCallSettings createReusableConfigSettings() { + return createReusableConfigSettings; + } + + /** Returns the object with the settings used for calls to createReusableConfig. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + createReusableConfigOperationSettings() { + return createReusableConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteReusableConfig. */ + public UnaryCallSettings deleteReusableConfigSettings() { + return deleteReusableConfigSettings; + } + + /** Returns the object with the settings used for calls to deleteReusableConfig. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + deleteReusableConfigOperationSettings() { + return deleteReusableConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to getReusableConfig. */ + public UnaryCallSettings getReusableConfigSettings() { + return getReusableConfigSettings; + } + + /** Returns the object with the settings used for calls to listReusableConfigs. */ + public PagedCallSettings< + ListReusableConfigsRequest, ListReusableConfigsResponse, ListReusableConfigsPagedResponse> + listReusableConfigsSettings() { + return listReusableConfigsSettings; + } + + /** Returns the object with the settings used for calls to updateReusableConfig. */ + public UnaryCallSettings updateReusableConfigSettings() { + return updateReusableConfigSettings; + } + + /** Returns the object with the settings used for calls to updateReusableConfig. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + updateReusableConfigOperationSettings() { + return updateReusableConfigOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CertificateAuthorityServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCertificateAuthorityServiceStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "privateca.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(CertificateAuthorityServiceStubSettings.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 CertificateAuthorityServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createCertificateSettings = settingsBuilder.createCertificateSettings().build(); + getCertificateSettings = settingsBuilder.getCertificateSettings().build(); + listCertificatesSettings = settingsBuilder.listCertificatesSettings().build(); + revokeCertificateSettings = settingsBuilder.revokeCertificateSettings().build(); + updateCertificateSettings = settingsBuilder.updateCertificateSettings().build(); + activateCertificateAuthoritySettings = + settingsBuilder.activateCertificateAuthoritySettings().build(); + activateCertificateAuthorityOperationSettings = + settingsBuilder.activateCertificateAuthorityOperationSettings().build(); + createCertificateAuthoritySettings = + settingsBuilder.createCertificateAuthoritySettings().build(); + createCertificateAuthorityOperationSettings = + settingsBuilder.createCertificateAuthorityOperationSettings().build(); + disableCertificateAuthoritySettings = + settingsBuilder.disableCertificateAuthoritySettings().build(); + disableCertificateAuthorityOperationSettings = + settingsBuilder.disableCertificateAuthorityOperationSettings().build(); + enableCertificateAuthoritySettings = + settingsBuilder.enableCertificateAuthoritySettings().build(); + enableCertificateAuthorityOperationSettings = + settingsBuilder.enableCertificateAuthorityOperationSettings().build(); + fetchCertificateAuthorityCsrSettings = + settingsBuilder.fetchCertificateAuthorityCsrSettings().build(); + getCertificateAuthoritySettings = settingsBuilder.getCertificateAuthoritySettings().build(); + listCertificateAuthoritiesSettings = + settingsBuilder.listCertificateAuthoritiesSettings().build(); + restoreCertificateAuthoritySettings = + settingsBuilder.restoreCertificateAuthoritySettings().build(); + restoreCertificateAuthorityOperationSettings = + settingsBuilder.restoreCertificateAuthorityOperationSettings().build(); + scheduleDeleteCertificateAuthoritySettings = + settingsBuilder.scheduleDeleteCertificateAuthoritySettings().build(); + scheduleDeleteCertificateAuthorityOperationSettings = + settingsBuilder.scheduleDeleteCertificateAuthorityOperationSettings().build(); + updateCertificateAuthoritySettings = + settingsBuilder.updateCertificateAuthoritySettings().build(); + updateCertificateAuthorityOperationSettings = + settingsBuilder.updateCertificateAuthorityOperationSettings().build(); + createCertificateRevocationListSettings = + settingsBuilder.createCertificateRevocationListSettings().build(); + createCertificateRevocationListOperationSettings = + settingsBuilder.createCertificateRevocationListOperationSettings().build(); + getCertificateRevocationListSettings = + settingsBuilder.getCertificateRevocationListSettings().build(); + listCertificateRevocationListsSettings = + settingsBuilder.listCertificateRevocationListsSettings().build(); + updateCertificateRevocationListSettings = + settingsBuilder.updateCertificateRevocationListSettings().build(); + updateCertificateRevocationListOperationSettings = + settingsBuilder.updateCertificateRevocationListOperationSettings().build(); + createReusableConfigSettings = settingsBuilder.createReusableConfigSettings().build(); + createReusableConfigOperationSettings = + settingsBuilder.createReusableConfigOperationSettings().build(); + deleteReusableConfigSettings = settingsBuilder.deleteReusableConfigSettings().build(); + deleteReusableConfigOperationSettings = + settingsBuilder.deleteReusableConfigOperationSettings().build(); + getReusableConfigSettings = settingsBuilder.getReusableConfigSettings().build(); + listReusableConfigsSettings = settingsBuilder.listReusableConfigsSettings().build(); + updateReusableConfigSettings = settingsBuilder.updateReusableConfigSettings().build(); + updateReusableConfigOperationSettings = + settingsBuilder.updateReusableConfigOperationSettings().build(); + } + + private static final PagedListDescriptor< + ListCertificatesRequest, ListCertificatesResponse, Certificate> + LIST_CERTIFICATES_PAGE_STR_DESC = + new PagedListDescriptor< + ListCertificatesRequest, ListCertificatesResponse, Certificate>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCertificatesRequest injectToken( + ListCertificatesRequest payload, String token) { + return ListCertificatesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCertificatesRequest injectPageSize( + ListCertificatesRequest payload, int pageSize) { + return ListCertificatesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCertificatesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCertificatesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCertificatesResponse payload) { + return payload.getCertificatesList() != null + ? payload.getCertificatesList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + CertificateAuthority> + LIST_CERTIFICATE_AUTHORITIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + CertificateAuthority>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCertificateAuthoritiesRequest injectToken( + ListCertificateAuthoritiesRequest payload, String token) { + return ListCertificateAuthoritiesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListCertificateAuthoritiesRequest injectPageSize( + ListCertificateAuthoritiesRequest payload, int pageSize) { + return ListCertificateAuthoritiesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListCertificateAuthoritiesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCertificateAuthoritiesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListCertificateAuthoritiesResponse payload) { + return payload.getCertificateAuthoritiesList() != null + ? payload.getCertificateAuthoritiesList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + CertificateRevocationList> + LIST_CERTIFICATE_REVOCATION_LISTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + CertificateRevocationList>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCertificateRevocationListsRequest injectToken( + ListCertificateRevocationListsRequest payload, String token) { + return ListCertificateRevocationListsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListCertificateRevocationListsRequest injectPageSize( + ListCertificateRevocationListsRequest payload, int pageSize) { + return ListCertificateRevocationListsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListCertificateRevocationListsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCertificateRevocationListsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListCertificateRevocationListsResponse payload) { + return payload.getCertificateRevocationListsList() != null + ? payload.getCertificateRevocationListsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListReusableConfigsRequest, ListReusableConfigsResponse, ReusableConfig> + LIST_REUSABLE_CONFIGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListReusableConfigsRequest, ListReusableConfigsResponse, ReusableConfig>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListReusableConfigsRequest injectToken( + ListReusableConfigsRequest payload, String token) { + return ListReusableConfigsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListReusableConfigsRequest injectPageSize( + ListReusableConfigsRequest payload, int pageSize) { + return ListReusableConfigsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListReusableConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListReusableConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListReusableConfigsResponse payload) { + return payload.getReusableConfigsList() != null + ? payload.getReusableConfigsList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + LIST_CERTIFICATES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCertificatesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_CERTIFICATES_PAGE_STR_DESC, request, context); + return ListCertificatesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + ListCertificateAuthoritiesPagedResponse> + LIST_CERTIFICATE_AUTHORITIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + ListCertificateAuthoritiesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListCertificateAuthoritiesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + CertificateAuthority> + pageContext = + PageContext.create( + callable, LIST_CERTIFICATE_AUTHORITIES_PAGE_STR_DESC, request, context); + return ListCertificateAuthoritiesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + ListCertificateRevocationListsPagedResponse> + LIST_CERTIFICATE_REVOCATION_LISTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + ListCertificateRevocationListsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse> + callable, + ListCertificateRevocationListsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + CertificateRevocationList> + pageContext = + PageContext.create( + callable, + LIST_CERTIFICATE_REVOCATION_LISTS_PAGE_STR_DESC, + request, + context); + return ListCertificateRevocationListsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListReusableConfigsRequest, ListReusableConfigsResponse, ListReusableConfigsPagedResponse> + LIST_REUSABLE_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListReusableConfigsRequest, + ListReusableConfigsResponse, + ListReusableConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListReusableConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_REUSABLE_CONFIGS_PAGE_STR_DESC, request, context); + return ListReusableConfigsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Builder for CertificateAuthorityServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder + createCertificateSettings; + private final UnaryCallSettings.Builder + getCertificateSettings; + private final PagedCallSettings.Builder< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings; + private final UnaryCallSettings.Builder + revokeCertificateSettings; + private final UnaryCallSettings.Builder + updateCertificateSettings; + private final UnaryCallSettings.Builder + activateCertificateAuthoritySettings; + private final OperationCallSettings.Builder< + ActivateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + activateCertificateAuthorityOperationSettings; + private final UnaryCallSettings.Builder + createCertificateAuthoritySettings; + private final OperationCallSettings.Builder< + CreateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + createCertificateAuthorityOperationSettings; + private final UnaryCallSettings.Builder + disableCertificateAuthoritySettings; + private final OperationCallSettings.Builder< + DisableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + disableCertificateAuthorityOperationSettings; + private final UnaryCallSettings.Builder + enableCertificateAuthoritySettings; + private final OperationCallSettings.Builder< + EnableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + enableCertificateAuthorityOperationSettings; + private final UnaryCallSettings.Builder< + FetchCertificateAuthorityCsrRequest, FetchCertificateAuthorityCsrResponse> + fetchCertificateAuthorityCsrSettings; + private final UnaryCallSettings.Builder + getCertificateAuthoritySettings; + private final PagedCallSettings.Builder< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + ListCertificateAuthoritiesPagedResponse> + listCertificateAuthoritiesSettings; + private final UnaryCallSettings.Builder + restoreCertificateAuthoritySettings; + private final OperationCallSettings.Builder< + RestoreCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + restoreCertificateAuthorityOperationSettings; + private final UnaryCallSettings.Builder + scheduleDeleteCertificateAuthoritySettings; + private final OperationCallSettings.Builder< + ScheduleDeleteCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + scheduleDeleteCertificateAuthorityOperationSettings; + private final UnaryCallSettings.Builder + updateCertificateAuthoritySettings; + private final OperationCallSettings.Builder< + UpdateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + updateCertificateAuthorityOperationSettings; + private final UnaryCallSettings.Builder + createCertificateRevocationListSettings; + private final OperationCallSettings.Builder< + CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + createCertificateRevocationListOperationSettings; + private final UnaryCallSettings.Builder< + GetCertificateRevocationListRequest, CertificateRevocationList> + getCertificateRevocationListSettings; + private final PagedCallSettings.Builder< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + ListCertificateRevocationListsPagedResponse> + listCertificateRevocationListsSettings; + private final UnaryCallSettings.Builder + updateCertificateRevocationListSettings; + private final OperationCallSettings.Builder< + UpdateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + updateCertificateRevocationListOperationSettings; + private final UnaryCallSettings.Builder + createReusableConfigSettings; + private final OperationCallSettings.Builder< + CreateReusableConfigRequest, ReusableConfig, OperationMetadata> + createReusableConfigOperationSettings; + private final UnaryCallSettings.Builder + deleteReusableConfigSettings; + private final OperationCallSettings.Builder< + DeleteReusableConfigRequest, Empty, OperationMetadata> + deleteReusableConfigOperationSettings; + private final UnaryCallSettings.Builder + getReusableConfigSettings; + private final PagedCallSettings.Builder< + ListReusableConfigsRequest, + ListReusableConfigsResponse, + ListReusableConfigsPagedResponse> + listReusableConfigsSettings; + private final UnaryCallSettings.Builder + updateReusableConfigSettings; + private final OperationCallSettings.Builder< + UpdateReusableConfigRequest, ReusableConfig, OperationMetadata> + updateReusableConfigOperationSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNKNOWN, + StatusCode.Code.UNAVAILABLE, + StatusCode.Code.DEADLINE_EXCEEDED))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listCertificatesSettings = PagedCallSettings.newBuilder(LIST_CERTIFICATES_PAGE_STR_FACT); + + revokeCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + activateCertificateAuthoritySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + activateCertificateAuthorityOperationSettings = OperationCallSettings.newBuilder(); + + createCertificateAuthoritySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createCertificateAuthorityOperationSettings = OperationCallSettings.newBuilder(); + + disableCertificateAuthoritySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + disableCertificateAuthorityOperationSettings = OperationCallSettings.newBuilder(); + + enableCertificateAuthoritySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + enableCertificateAuthorityOperationSettings = OperationCallSettings.newBuilder(); + + fetchCertificateAuthorityCsrSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getCertificateAuthoritySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listCertificateAuthoritiesSettings = + PagedCallSettings.newBuilder(LIST_CERTIFICATE_AUTHORITIES_PAGE_STR_FACT); + + restoreCertificateAuthoritySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + restoreCertificateAuthorityOperationSettings = OperationCallSettings.newBuilder(); + + scheduleDeleteCertificateAuthoritySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + scheduleDeleteCertificateAuthorityOperationSettings = OperationCallSettings.newBuilder(); + + updateCertificateAuthoritySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateCertificateAuthorityOperationSettings = OperationCallSettings.newBuilder(); + + createCertificateRevocationListSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createCertificateRevocationListOperationSettings = OperationCallSettings.newBuilder(); + + getCertificateRevocationListSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listCertificateRevocationListsSettings = + PagedCallSettings.newBuilder(LIST_CERTIFICATE_REVOCATION_LISTS_PAGE_STR_FACT); + + updateCertificateRevocationListSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateCertificateRevocationListOperationSettings = OperationCallSettings.newBuilder(); + + createReusableConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createReusableConfigOperationSettings = OperationCallSettings.newBuilder(); + + deleteReusableConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteReusableConfigOperationSettings = OperationCallSettings.newBuilder(); + + getReusableConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listReusableConfigsSettings = + PagedCallSettings.newBuilder(LIST_REUSABLE_CONFIGS_PAGE_STR_FACT); + + updateReusableConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateReusableConfigOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createCertificateSettings, + getCertificateSettings, + listCertificatesSettings, + revokeCertificateSettings, + updateCertificateSettings, + activateCertificateAuthoritySettings, + createCertificateAuthoritySettings, + disableCertificateAuthoritySettings, + enableCertificateAuthoritySettings, + fetchCertificateAuthorityCsrSettings, + getCertificateAuthoritySettings, + listCertificateAuthoritiesSettings, + restoreCertificateAuthoritySettings, + scheduleDeleteCertificateAuthoritySettings, + updateCertificateAuthoritySettings, + createCertificateRevocationListSettings, + getCertificateRevocationListSettings, + listCertificateRevocationListsSettings, + updateCertificateRevocationListSettings, + createReusableConfigSettings, + deleteReusableConfigSettings, + getReusableConfigSettings, + listReusableConfigsSettings, + updateReusableConfigSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .createCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .getCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listCertificatesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .revokeCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .updateCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .activateCertificateAuthoritySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .createCertificateAuthoritySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .disableCertificateAuthoritySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .enableCertificateAuthoritySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .fetchCertificateAuthorityCsrSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .getCertificateAuthoritySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listCertificateAuthoritiesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .restoreCertificateAuthoritySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .scheduleDeleteCertificateAuthoritySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .updateCertificateAuthoritySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .createCertificateRevocationListSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .getCertificateRevocationListSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listCertificateRevocationListsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .updateCertificateRevocationListSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .createReusableConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .deleteReusableConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .getReusableConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listReusableConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .updateReusableConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + builder + .activateCertificateAuthorityOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CertificateAuthority.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .createCertificateAuthorityOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CertificateAuthority.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .disableCertificateAuthorityOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CertificateAuthority.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .enableCertificateAuthorityOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CertificateAuthority.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .restoreCertificateAuthorityOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CertificateAuthority.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .scheduleDeleteCertificateAuthorityOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CertificateAuthority.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .updateCertificateAuthorityOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CertificateAuthority.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .createCertificateRevocationListOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + CertificateRevocationList.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .updateCertificateRevocationListOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + CertificateRevocationList.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .createReusableConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ReusableConfig.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .deleteReusableConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .updateReusableConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ReusableConfig.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + protected Builder(CertificateAuthorityServiceStubSettings settings) { + super(settings); + + createCertificateSettings = settings.createCertificateSettings.toBuilder(); + getCertificateSettings = settings.getCertificateSettings.toBuilder(); + listCertificatesSettings = settings.listCertificatesSettings.toBuilder(); + revokeCertificateSettings = settings.revokeCertificateSettings.toBuilder(); + updateCertificateSettings = settings.updateCertificateSettings.toBuilder(); + activateCertificateAuthoritySettings = + settings.activateCertificateAuthoritySettings.toBuilder(); + activateCertificateAuthorityOperationSettings = + settings.activateCertificateAuthorityOperationSettings.toBuilder(); + createCertificateAuthoritySettings = settings.createCertificateAuthoritySettings.toBuilder(); + createCertificateAuthorityOperationSettings = + settings.createCertificateAuthorityOperationSettings.toBuilder(); + disableCertificateAuthoritySettings = + settings.disableCertificateAuthoritySettings.toBuilder(); + disableCertificateAuthorityOperationSettings = + settings.disableCertificateAuthorityOperationSettings.toBuilder(); + enableCertificateAuthoritySettings = settings.enableCertificateAuthoritySettings.toBuilder(); + enableCertificateAuthorityOperationSettings = + settings.enableCertificateAuthorityOperationSettings.toBuilder(); + fetchCertificateAuthorityCsrSettings = + settings.fetchCertificateAuthorityCsrSettings.toBuilder(); + getCertificateAuthoritySettings = settings.getCertificateAuthoritySettings.toBuilder(); + listCertificateAuthoritiesSettings = settings.listCertificateAuthoritiesSettings.toBuilder(); + restoreCertificateAuthoritySettings = + settings.restoreCertificateAuthoritySettings.toBuilder(); + restoreCertificateAuthorityOperationSettings = + settings.restoreCertificateAuthorityOperationSettings.toBuilder(); + scheduleDeleteCertificateAuthoritySettings = + settings.scheduleDeleteCertificateAuthoritySettings.toBuilder(); + scheduleDeleteCertificateAuthorityOperationSettings = + settings.scheduleDeleteCertificateAuthorityOperationSettings.toBuilder(); + updateCertificateAuthoritySettings = settings.updateCertificateAuthoritySettings.toBuilder(); + updateCertificateAuthorityOperationSettings = + settings.updateCertificateAuthorityOperationSettings.toBuilder(); + createCertificateRevocationListSettings = + settings.createCertificateRevocationListSettings.toBuilder(); + createCertificateRevocationListOperationSettings = + settings.createCertificateRevocationListOperationSettings.toBuilder(); + getCertificateRevocationListSettings = + settings.getCertificateRevocationListSettings.toBuilder(); + listCertificateRevocationListsSettings = + settings.listCertificateRevocationListsSettings.toBuilder(); + updateCertificateRevocationListSettings = + settings.updateCertificateRevocationListSettings.toBuilder(); + updateCertificateRevocationListOperationSettings = + settings.updateCertificateRevocationListOperationSettings.toBuilder(); + createReusableConfigSettings = settings.createReusableConfigSettings.toBuilder(); + createReusableConfigOperationSettings = + settings.createReusableConfigOperationSettings.toBuilder(); + deleteReusableConfigSettings = settings.deleteReusableConfigSettings.toBuilder(); + deleteReusableConfigOperationSettings = + settings.deleteReusableConfigOperationSettings.toBuilder(); + getReusableConfigSettings = settings.getReusableConfigSettings.toBuilder(); + listReusableConfigsSettings = settings.listReusableConfigsSettings.toBuilder(); + updateReusableConfigSettings = settings.updateReusableConfigSettings.toBuilder(); + updateReusableConfigOperationSettings = + settings.updateReusableConfigOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createCertificateSettings, + getCertificateSettings, + listCertificatesSettings, + revokeCertificateSettings, + updateCertificateSettings, + activateCertificateAuthoritySettings, + createCertificateAuthoritySettings, + disableCertificateAuthoritySettings, + enableCertificateAuthoritySettings, + fetchCertificateAuthorityCsrSettings, + getCertificateAuthoritySettings, + listCertificateAuthoritiesSettings, + restoreCertificateAuthoritySettings, + scheduleDeleteCertificateAuthoritySettings, + updateCertificateAuthoritySettings, + createCertificateRevocationListSettings, + getCertificateRevocationListSettings, + listCertificateRevocationListsSettings, + updateCertificateRevocationListSettings, + createReusableConfigSettings, + deleteReusableConfigSettings, + getReusableConfigSettings, + listReusableConfigsSettings, + updateReusableConfigSettings); + } + + // 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 createCertificate. */ + public UnaryCallSettings.Builder + createCertificateSettings() { + return createCertificateSettings; + } + + /** Returns the builder for the settings used for calls to getCertificate. */ + public UnaryCallSettings.Builder getCertificateSettings() { + return getCertificateSettings; + } + + /** Returns the builder for the settings used for calls to listCertificates. */ + public PagedCallSettings.Builder< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings() { + return listCertificatesSettings; + } + + /** Returns the builder for the settings used for calls to revokeCertificate. */ + public UnaryCallSettings.Builder + revokeCertificateSettings() { + return revokeCertificateSettings; + } + + /** Returns the builder for the settings used for calls to updateCertificate. */ + public UnaryCallSettings.Builder + updateCertificateSettings() { + return updateCertificateSettings; + } + + /** Returns the builder for the settings used for calls to activateCertificateAuthority. */ + public UnaryCallSettings.Builder + activateCertificateAuthoritySettings() { + return activateCertificateAuthoritySettings; + } + + /** Returns the builder for the settings used for calls to activateCertificateAuthority. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ActivateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + activateCertificateAuthorityOperationSettings() { + return activateCertificateAuthorityOperationSettings; + } + + /** Returns the builder for the settings used for calls to createCertificateAuthority. */ + public UnaryCallSettings.Builder + createCertificateAuthoritySettings() { + return createCertificateAuthoritySettings; + } + + /** Returns the builder for the settings used for calls to createCertificateAuthority. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + createCertificateAuthorityOperationSettings() { + return createCertificateAuthorityOperationSettings; + } + + /** Returns the builder for the settings used for calls to disableCertificateAuthority. */ + public UnaryCallSettings.Builder + disableCertificateAuthoritySettings() { + return disableCertificateAuthoritySettings; + } + + /** Returns the builder for the settings used for calls to disableCertificateAuthority. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DisableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + disableCertificateAuthorityOperationSettings() { + return disableCertificateAuthorityOperationSettings; + } + + /** Returns the builder for the settings used for calls to enableCertificateAuthority. */ + public UnaryCallSettings.Builder + enableCertificateAuthoritySettings() { + return enableCertificateAuthoritySettings; + } + + /** Returns the builder for the settings used for calls to enableCertificateAuthority. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + EnableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + enableCertificateAuthorityOperationSettings() { + return enableCertificateAuthorityOperationSettings; + } + + /** Returns the builder for the settings used for calls to fetchCertificateAuthorityCsr. */ + public UnaryCallSettings.Builder< + FetchCertificateAuthorityCsrRequest, FetchCertificateAuthorityCsrResponse> + fetchCertificateAuthorityCsrSettings() { + return fetchCertificateAuthorityCsrSettings; + } + + /** Returns the builder for the settings used for calls to getCertificateAuthority. */ + public UnaryCallSettings.Builder + getCertificateAuthoritySettings() { + return getCertificateAuthoritySettings; + } + + /** Returns the builder for the settings used for calls to listCertificateAuthorities. */ + public PagedCallSettings.Builder< + ListCertificateAuthoritiesRequest, + ListCertificateAuthoritiesResponse, + ListCertificateAuthoritiesPagedResponse> + listCertificateAuthoritiesSettings() { + return listCertificateAuthoritiesSettings; + } + + /** Returns the builder for the settings used for calls to restoreCertificateAuthority. */ + public UnaryCallSettings.Builder + restoreCertificateAuthoritySettings() { + return restoreCertificateAuthoritySettings; + } + + /** Returns the builder for the settings used for calls to restoreCertificateAuthority. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + RestoreCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + restoreCertificateAuthorityOperationSettings() { + return restoreCertificateAuthorityOperationSettings; + } + + /** + * Returns the builder for the settings used for calls to scheduleDeleteCertificateAuthority. + */ + public UnaryCallSettings.Builder + scheduleDeleteCertificateAuthoritySettings() { + return scheduleDeleteCertificateAuthoritySettings; + } + + /** + * Returns the builder for the settings used for calls to scheduleDeleteCertificateAuthority. + */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ScheduleDeleteCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + scheduleDeleteCertificateAuthorityOperationSettings() { + return scheduleDeleteCertificateAuthorityOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateCertificateAuthority. */ + public UnaryCallSettings.Builder + updateCertificateAuthoritySettings() { + return updateCertificateAuthoritySettings; + } + + /** Returns the builder for the settings used for calls to updateCertificateAuthority. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + updateCertificateAuthorityOperationSettings() { + return updateCertificateAuthorityOperationSettings; + } + + /** Returns the builder for the settings used for calls to createCertificateRevocationList. */ + public UnaryCallSettings.Builder + createCertificateRevocationListSettings() { + return createCertificateRevocationListSettings; + } + + /** Returns the builder for the settings used for calls to createCertificateRevocationList. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + createCertificateRevocationListOperationSettings() { + return createCertificateRevocationListOperationSettings; + } + + /** Returns the builder for the settings used for calls to getCertificateRevocationList. */ + public UnaryCallSettings.Builder + getCertificateRevocationListSettings() { + return getCertificateRevocationListSettings; + } + + /** Returns the builder for the settings used for calls to listCertificateRevocationLists. */ + public PagedCallSettings.Builder< + ListCertificateRevocationListsRequest, + ListCertificateRevocationListsResponse, + ListCertificateRevocationListsPagedResponse> + listCertificateRevocationListsSettings() { + return listCertificateRevocationListsSettings; + } + + /** Returns the builder for the settings used for calls to updateCertificateRevocationList. */ + public UnaryCallSettings.Builder + updateCertificateRevocationListSettings() { + return updateCertificateRevocationListSettings; + } + + /** Returns the builder for the settings used for calls to updateCertificateRevocationList. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + updateCertificateRevocationListOperationSettings() { + return updateCertificateRevocationListOperationSettings; + } + + /** Returns the builder for the settings used for calls to createReusableConfig. */ + public UnaryCallSettings.Builder + createReusableConfigSettings() { + return createReusableConfigSettings; + } + + /** Returns the builder for the settings used for calls to createReusableConfig. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateReusableConfigRequest, ReusableConfig, OperationMetadata> + createReusableConfigOperationSettings() { + return createReusableConfigOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteReusableConfig. */ + public UnaryCallSettings.Builder + deleteReusableConfigSettings() { + return deleteReusableConfigSettings; + } + + /** Returns the builder for the settings used for calls to deleteReusableConfig. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteReusableConfigOperationSettings() { + return deleteReusableConfigOperationSettings; + } + + /** Returns the builder for the settings used for calls to getReusableConfig. */ + public UnaryCallSettings.Builder + getReusableConfigSettings() { + return getReusableConfigSettings; + } + + /** Returns the builder for the settings used for calls to listReusableConfigs. */ + public PagedCallSettings.Builder< + ListReusableConfigsRequest, + ListReusableConfigsResponse, + ListReusableConfigsPagedResponse> + listReusableConfigsSettings() { + return listReusableConfigsSettings; + } + + /** Returns the builder for the settings used for calls to updateReusableConfig. */ + public UnaryCallSettings.Builder + updateReusableConfigSettings() { + return updateReusableConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateReusableConfig. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateReusableConfigRequest, ReusableConfig, OperationMetadata> + updateReusableConfigOperationSettings() { + return updateReusableConfigOperationSettings; + } + + @Override + public CertificateAuthorityServiceStubSettings build() throws IOException { + return new CertificateAuthorityServiceStubSettings(this); + } + } +} diff --git a/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/GrpcCertificateAuthorityServiceCallableFactory.java b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/GrpcCertificateAuthorityServiceCallableFactory.java new file mode 100644 index 00000000..7d944cd4 --- /dev/null +++ b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/GrpcCertificateAuthorityServiceCallableFactory.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. + */ +package com.google.cloud.security.privateca.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Certificate Authority API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcCertificateAuthorityServiceCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/GrpcCertificateAuthorityServiceStub.java b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/GrpcCertificateAuthorityServiceStub.java new file mode 100644 index 00000000..3ba3a939 --- /dev/null +++ b/google-cloud-security-privateca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/GrpcCertificateAuthorityServiceStub.java @@ -0,0 +1,1297 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1.stub; + +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificatesPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.Certificate; +import com.google.cloud.security.privateca.v1beta1.CertificateAuthority; +import com.google.cloud.security.privateca.v1beta1.CertificateRevocationList; +import com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest; +import com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest; +import com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest; +import com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest; +import com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse; +import com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.GetCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest; +import com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse; +import com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse; +import com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest; +import com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse; +import com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest; +import com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse; +import com.google.cloud.security.privateca.v1beta1.OperationMetadata; +import com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.ReusableConfig; +import com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest; +import com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest; +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 Certificate Authority API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcCertificateAuthorityServiceStub extends CertificateAuthorityServiceStub { + + private static final MethodDescriptor + createCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/CreateCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCertificateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Certificate.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/GetCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(GetCertificateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Certificate.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listCertificatesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/ListCertificates") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCertificatesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCertificatesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + revokeCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/RevokeCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(RevokeCertificateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Certificate.getDefaultInstance())) + .build(); + private static final MethodDescriptor + updateCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/UpdateCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCertificateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Certificate.getDefaultInstance())) + .build(); + private static final MethodDescriptor + activateCertificateAuthorityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/ActivateCertificateAuthority") + .setRequestMarshaller( + ProtoUtils.marshaller(ActivateCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + createCertificateAuthorityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/CreateCertificateAuthority") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + disableCertificateAuthorityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/DisableCertificateAuthority") + .setRequestMarshaller( + ProtoUtils.marshaller(DisableCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + enableCertificateAuthorityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/EnableCertificateAuthority") + .setRequestMarshaller( + ProtoUtils.marshaller(EnableCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor< + FetchCertificateAuthorityCsrRequest, FetchCertificateAuthorityCsrResponse> + fetchCertificateAuthorityCsrMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/FetchCertificateAuthorityCsr") + .setRequestMarshaller( + ProtoUtils.marshaller(FetchCertificateAuthorityCsrRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FetchCertificateAuthorityCsrResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getCertificateAuthorityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/GetCertificateAuthority") + .setRequestMarshaller( + ProtoUtils.marshaller(GetCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CertificateAuthority.getDefaultInstance())) + .build(); + private static final MethodDescriptor< + ListCertificateAuthoritiesRequest, ListCertificateAuthoritiesResponse> + listCertificateAuthoritiesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/ListCertificateAuthorities") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCertificateAuthoritiesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCertificateAuthoritiesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + restoreCertificateAuthorityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/RestoreCertificateAuthority") + .setRequestMarshaller( + ProtoUtils.marshaller(RestoreCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + scheduleDeleteCertificateAuthorityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/ScheduleDeleteCertificateAuthority") + .setRequestMarshaller( + ProtoUtils.marshaller( + ScheduleDeleteCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + updateCertificateAuthorityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/UpdateCertificateAuthority") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + createCertificateRevocationListMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/CreateCertificateRevocationList") + .setRequestMarshaller( + ProtoUtils.marshaller( + CreateCertificateRevocationListRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor< + GetCertificateRevocationListRequest, CertificateRevocationList> + getCertificateRevocationListMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/GetCertificateRevocationList") + .setRequestMarshaller( + ProtoUtils.marshaller(GetCertificateRevocationListRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CertificateRevocationList.getDefaultInstance())) + .build(); + private static final MethodDescriptor< + ListCertificateRevocationListsRequest, ListCertificateRevocationListsResponse> + listCertificateRevocationListsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/ListCertificateRevocationLists") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCertificateRevocationListsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ListCertificateRevocationListsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + updateCertificateRevocationListMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/UpdateCertificateRevocationList") + .setRequestMarshaller( + ProtoUtils.marshaller( + UpdateCertificateRevocationListRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + createReusableConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/CreateReusableConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateReusableConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deleteReusableConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/DeleteReusableConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteReusableConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getReusableConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/GetReusableConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetReusableConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ReusableConfig.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listReusableConfigsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/ListReusableConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListReusableConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListReusableConfigsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + updateReusableConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService/UpdateReusableConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateReusableConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + + private final UnaryCallable createCertificateCallable; + private final UnaryCallable getCertificateCallable; + private final UnaryCallable + listCertificatesCallable; + private final UnaryCallable + listCertificatesPagedCallable; + private final UnaryCallable revokeCertificateCallable; + private final UnaryCallable updateCertificateCallable; + private final UnaryCallable + activateCertificateAuthorityCallable; + private final OperationCallable< + ActivateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + activateCertificateAuthorityOperationCallable; + private final UnaryCallable + createCertificateAuthorityCallable; + private final OperationCallable< + CreateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + createCertificateAuthorityOperationCallable; + private final UnaryCallable + disableCertificateAuthorityCallable; + private final OperationCallable< + DisableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + disableCertificateAuthorityOperationCallable; + private final UnaryCallable + enableCertificateAuthorityCallable; + private final OperationCallable< + EnableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + enableCertificateAuthorityOperationCallable; + private final UnaryCallable< + FetchCertificateAuthorityCsrRequest, FetchCertificateAuthorityCsrResponse> + fetchCertificateAuthorityCsrCallable; + private final UnaryCallable + getCertificateAuthorityCallable; + private final UnaryCallable + listCertificateAuthoritiesCallable; + private final UnaryCallable< + ListCertificateAuthoritiesRequest, ListCertificateAuthoritiesPagedResponse> + listCertificateAuthoritiesPagedCallable; + private final UnaryCallable + restoreCertificateAuthorityCallable; + private final OperationCallable< + RestoreCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + restoreCertificateAuthorityOperationCallable; + private final UnaryCallable + scheduleDeleteCertificateAuthorityCallable; + private final OperationCallable< + ScheduleDeleteCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + scheduleDeleteCertificateAuthorityOperationCallable; + private final UnaryCallable + updateCertificateAuthorityCallable; + private final OperationCallable< + UpdateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + updateCertificateAuthorityOperationCallable; + private final UnaryCallable + createCertificateRevocationListCallable; + private final OperationCallable< + CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + createCertificateRevocationListOperationCallable; + private final UnaryCallable + getCertificateRevocationListCallable; + private final UnaryCallable< + ListCertificateRevocationListsRequest, ListCertificateRevocationListsResponse> + listCertificateRevocationListsCallable; + private final UnaryCallable< + ListCertificateRevocationListsRequest, ListCertificateRevocationListsPagedResponse> + listCertificateRevocationListsPagedCallable; + private final UnaryCallable + updateCertificateRevocationListCallable; + private final OperationCallable< + UpdateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + updateCertificateRevocationListOperationCallable; + private final UnaryCallable createReusableConfigCallable; + private final OperationCallable + createReusableConfigOperationCallable; + private final UnaryCallable deleteReusableConfigCallable; + private final OperationCallable + deleteReusableConfigOperationCallable; + private final UnaryCallable getReusableConfigCallable; + private final UnaryCallable + listReusableConfigsCallable; + private final UnaryCallable + listReusableConfigsPagedCallable; + private final UnaryCallable updateReusableConfigCallable; + private final OperationCallable + updateReusableConfigOperationCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCertificateAuthorityServiceStub create( + CertificateAuthorityServiceStubSettings settings) throws IOException { + return new GrpcCertificateAuthorityServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCertificateAuthorityServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcCertificateAuthorityServiceStub( + CertificateAuthorityServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCertificateAuthorityServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCertificateAuthorityServiceStub( + CertificateAuthorityServiceStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcCertificateAuthorityServiceStub, 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 GrpcCertificateAuthorityServiceStub( + CertificateAuthorityServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcCertificateAuthorityServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcCertificateAuthorityServiceStub, 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 GrpcCertificateAuthorityServiceStub( + CertificateAuthorityServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCertificateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateCertificateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCertificateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetCertificateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listCertificatesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCertificatesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListCertificatesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings revokeCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(revokeCertificateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RevokeCertificateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCertificateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateCertificateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "certificate.name", String.valueOf(request.getCertificate().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + activateCertificateAuthorityTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(activateCertificateAuthorityMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ActivateCertificateAuthorityRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createCertificateAuthorityTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCertificateAuthorityMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + CreateCertificateAuthorityRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + disableCertificateAuthorityTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(disableCertificateAuthorityMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + DisableCertificateAuthorityRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + enableCertificateAuthorityTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(enableCertificateAuthorityMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + EnableCertificateAuthorityRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + fetchCertificateAuthorityCsrTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(fetchCertificateAuthorityCsrMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + FetchCertificateAuthorityCsrRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getCertificateAuthorityTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCertificateAuthorityMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetCertificateAuthorityRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listCertificateAuthoritiesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listCertificateAuthoritiesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ListCertificateAuthoritiesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + restoreCertificateAuthorityTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(restoreCertificateAuthorityMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + RestoreCertificateAuthorityRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + scheduleDeleteCertificateAuthorityTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(scheduleDeleteCertificateAuthorityMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ScheduleDeleteCertificateAuthorityRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + updateCertificateAuthorityTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCertificateAuthorityMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + UpdateCertificateAuthorityRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "certificate_authority.name", + String.valueOf(request.getCertificateAuthority().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createCertificateRevocationListTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCertificateRevocationListMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + CreateCertificateRevocationListRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getCertificateRevocationListTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getCertificateRevocationListMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + GetCertificateRevocationListRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listCertificateRevocationListsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listCertificateRevocationListsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ListCertificateRevocationListsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + updateCertificateRevocationListTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCertificateRevocationListMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + UpdateCertificateRevocationListRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "certificate_revocation_list.name", + String.valueOf(request.getCertificateRevocationList().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createReusableConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createReusableConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateReusableConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteReusableConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteReusableConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteReusableConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getReusableConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getReusableConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetReusableConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listReusableConfigsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listReusableConfigsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListReusableConfigsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateReusableConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateReusableConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateReusableConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "reusable_config.name", + String.valueOf(request.getReusableConfig().getName())); + return params.build(); + } + }) + .build(); + + this.createCertificateCallable = + callableFactory.createUnaryCallable( + createCertificateTransportSettings, + settings.createCertificateSettings(), + clientContext); + this.getCertificateCallable = + callableFactory.createUnaryCallable( + getCertificateTransportSettings, settings.getCertificateSettings(), clientContext); + this.listCertificatesCallable = + callableFactory.createUnaryCallable( + listCertificatesTransportSettings, settings.listCertificatesSettings(), clientContext); + this.listCertificatesPagedCallable = + callableFactory.createPagedCallable( + listCertificatesTransportSettings, settings.listCertificatesSettings(), clientContext); + this.revokeCertificateCallable = + callableFactory.createUnaryCallable( + revokeCertificateTransportSettings, + settings.revokeCertificateSettings(), + clientContext); + this.updateCertificateCallable = + callableFactory.createUnaryCallable( + updateCertificateTransportSettings, + settings.updateCertificateSettings(), + clientContext); + this.activateCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + activateCertificateAuthorityTransportSettings, + settings.activateCertificateAuthoritySettings(), + clientContext); + this.activateCertificateAuthorityOperationCallable = + callableFactory.createOperationCallable( + activateCertificateAuthorityTransportSettings, + settings.activateCertificateAuthorityOperationSettings(), + clientContext, + this.operationsStub); + this.createCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + createCertificateAuthorityTransportSettings, + settings.createCertificateAuthoritySettings(), + clientContext); + this.createCertificateAuthorityOperationCallable = + callableFactory.createOperationCallable( + createCertificateAuthorityTransportSettings, + settings.createCertificateAuthorityOperationSettings(), + clientContext, + this.operationsStub); + this.disableCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + disableCertificateAuthorityTransportSettings, + settings.disableCertificateAuthoritySettings(), + clientContext); + this.disableCertificateAuthorityOperationCallable = + callableFactory.createOperationCallable( + disableCertificateAuthorityTransportSettings, + settings.disableCertificateAuthorityOperationSettings(), + clientContext, + this.operationsStub); + this.enableCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + enableCertificateAuthorityTransportSettings, + settings.enableCertificateAuthoritySettings(), + clientContext); + this.enableCertificateAuthorityOperationCallable = + callableFactory.createOperationCallable( + enableCertificateAuthorityTransportSettings, + settings.enableCertificateAuthorityOperationSettings(), + clientContext, + this.operationsStub); + this.fetchCertificateAuthorityCsrCallable = + callableFactory.createUnaryCallable( + fetchCertificateAuthorityCsrTransportSettings, + settings.fetchCertificateAuthorityCsrSettings(), + clientContext); + this.getCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + getCertificateAuthorityTransportSettings, + settings.getCertificateAuthoritySettings(), + clientContext); + this.listCertificateAuthoritiesCallable = + callableFactory.createUnaryCallable( + listCertificateAuthoritiesTransportSettings, + settings.listCertificateAuthoritiesSettings(), + clientContext); + this.listCertificateAuthoritiesPagedCallable = + callableFactory.createPagedCallable( + listCertificateAuthoritiesTransportSettings, + settings.listCertificateAuthoritiesSettings(), + clientContext); + this.restoreCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + restoreCertificateAuthorityTransportSettings, + settings.restoreCertificateAuthoritySettings(), + clientContext); + this.restoreCertificateAuthorityOperationCallable = + callableFactory.createOperationCallable( + restoreCertificateAuthorityTransportSettings, + settings.restoreCertificateAuthorityOperationSettings(), + clientContext, + this.operationsStub); + this.scheduleDeleteCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + scheduleDeleteCertificateAuthorityTransportSettings, + settings.scheduleDeleteCertificateAuthoritySettings(), + clientContext); + this.scheduleDeleteCertificateAuthorityOperationCallable = + callableFactory.createOperationCallable( + scheduleDeleteCertificateAuthorityTransportSettings, + settings.scheduleDeleteCertificateAuthorityOperationSettings(), + clientContext, + this.operationsStub); + this.updateCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + updateCertificateAuthorityTransportSettings, + settings.updateCertificateAuthoritySettings(), + clientContext); + this.updateCertificateAuthorityOperationCallable = + callableFactory.createOperationCallable( + updateCertificateAuthorityTransportSettings, + settings.updateCertificateAuthorityOperationSettings(), + clientContext, + this.operationsStub); + this.createCertificateRevocationListCallable = + callableFactory.createUnaryCallable( + createCertificateRevocationListTransportSettings, + settings.createCertificateRevocationListSettings(), + clientContext); + this.createCertificateRevocationListOperationCallable = + callableFactory.createOperationCallable( + createCertificateRevocationListTransportSettings, + settings.createCertificateRevocationListOperationSettings(), + clientContext, + this.operationsStub); + this.getCertificateRevocationListCallable = + callableFactory.createUnaryCallable( + getCertificateRevocationListTransportSettings, + settings.getCertificateRevocationListSettings(), + clientContext); + this.listCertificateRevocationListsCallable = + callableFactory.createUnaryCallable( + listCertificateRevocationListsTransportSettings, + settings.listCertificateRevocationListsSettings(), + clientContext); + this.listCertificateRevocationListsPagedCallable = + callableFactory.createPagedCallable( + listCertificateRevocationListsTransportSettings, + settings.listCertificateRevocationListsSettings(), + clientContext); + this.updateCertificateRevocationListCallable = + callableFactory.createUnaryCallable( + updateCertificateRevocationListTransportSettings, + settings.updateCertificateRevocationListSettings(), + clientContext); + this.updateCertificateRevocationListOperationCallable = + callableFactory.createOperationCallable( + updateCertificateRevocationListTransportSettings, + settings.updateCertificateRevocationListOperationSettings(), + clientContext, + this.operationsStub); + this.createReusableConfigCallable = + callableFactory.createUnaryCallable( + createReusableConfigTransportSettings, + settings.createReusableConfigSettings(), + clientContext); + this.createReusableConfigOperationCallable = + callableFactory.createOperationCallable( + createReusableConfigTransportSettings, + settings.createReusableConfigOperationSettings(), + clientContext, + this.operationsStub); + this.deleteReusableConfigCallable = + callableFactory.createUnaryCallable( + deleteReusableConfigTransportSettings, + settings.deleteReusableConfigSettings(), + clientContext); + this.deleteReusableConfigOperationCallable = + callableFactory.createOperationCallable( + deleteReusableConfigTransportSettings, + settings.deleteReusableConfigOperationSettings(), + clientContext, + this.operationsStub); + this.getReusableConfigCallable = + callableFactory.createUnaryCallable( + getReusableConfigTransportSettings, + settings.getReusableConfigSettings(), + clientContext); + this.listReusableConfigsCallable = + callableFactory.createUnaryCallable( + listReusableConfigsTransportSettings, + settings.listReusableConfigsSettings(), + clientContext); + this.listReusableConfigsPagedCallable = + callableFactory.createPagedCallable( + listReusableConfigsTransportSettings, + settings.listReusableConfigsSettings(), + clientContext); + this.updateReusableConfigCallable = + callableFactory.createUnaryCallable( + updateReusableConfigTransportSettings, + settings.updateReusableConfigSettings(), + clientContext); + this.updateReusableConfigOperationCallable = + callableFactory.createOperationCallable( + updateReusableConfigTransportSettings, + settings.updateReusableConfigOperationSettings(), + clientContext, + this.operationsStub); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable createCertificateCallable() { + return createCertificateCallable; + } + + public UnaryCallable getCertificateCallable() { + return getCertificateCallable; + } + + public UnaryCallable + listCertificatesPagedCallable() { + return listCertificatesPagedCallable; + } + + public UnaryCallable + listCertificatesCallable() { + return listCertificatesCallable; + } + + public UnaryCallable revokeCertificateCallable() { + return revokeCertificateCallable; + } + + public UnaryCallable updateCertificateCallable() { + return updateCertificateCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ActivateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + activateCertificateAuthorityOperationCallable() { + return activateCertificateAuthorityOperationCallable; + } + + public UnaryCallable + activateCertificateAuthorityCallable() { + return activateCertificateAuthorityCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + CreateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + createCertificateAuthorityOperationCallable() { + return createCertificateAuthorityOperationCallable; + } + + public UnaryCallable + createCertificateAuthorityCallable() { + return createCertificateAuthorityCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + DisableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + disableCertificateAuthorityOperationCallable() { + return disableCertificateAuthorityOperationCallable; + } + + public UnaryCallable + disableCertificateAuthorityCallable() { + return disableCertificateAuthorityCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + EnableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + enableCertificateAuthorityOperationCallable() { + return enableCertificateAuthorityOperationCallable; + } + + public UnaryCallable + enableCertificateAuthorityCallable() { + return enableCertificateAuthorityCallable; + } + + public UnaryCallable + fetchCertificateAuthorityCsrCallable() { + return fetchCertificateAuthorityCsrCallable; + } + + public UnaryCallable + getCertificateAuthorityCallable() { + return getCertificateAuthorityCallable; + } + + public UnaryCallable + listCertificateAuthoritiesPagedCallable() { + return listCertificateAuthoritiesPagedCallable; + } + + public UnaryCallable + listCertificateAuthoritiesCallable() { + return listCertificateAuthoritiesCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + RestoreCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + restoreCertificateAuthorityOperationCallable() { + return restoreCertificateAuthorityOperationCallable; + } + + public UnaryCallable + restoreCertificateAuthorityCallable() { + return restoreCertificateAuthorityCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ScheduleDeleteCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + scheduleDeleteCertificateAuthorityOperationCallable() { + return scheduleDeleteCertificateAuthorityOperationCallable; + } + + public UnaryCallable + scheduleDeleteCertificateAuthorityCallable() { + return scheduleDeleteCertificateAuthorityCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + UpdateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata> + updateCertificateAuthorityOperationCallable() { + return updateCertificateAuthorityOperationCallable; + } + + public UnaryCallable + updateCertificateAuthorityCallable() { + return updateCertificateAuthorityCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + createCertificateRevocationListOperationCallable() { + return createCertificateRevocationListOperationCallable; + } + + public UnaryCallable + createCertificateRevocationListCallable() { + return createCertificateRevocationListCallable; + } + + public UnaryCallable + getCertificateRevocationListCallable() { + return getCertificateRevocationListCallable; + } + + public UnaryCallable< + ListCertificateRevocationListsRequest, ListCertificateRevocationListsPagedResponse> + listCertificateRevocationListsPagedCallable() { + return listCertificateRevocationListsPagedCallable; + } + + public UnaryCallable< + ListCertificateRevocationListsRequest, ListCertificateRevocationListsResponse> + listCertificateRevocationListsCallable() { + return listCertificateRevocationListsCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + UpdateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata> + updateCertificateRevocationListOperationCallable() { + return updateCertificateRevocationListOperationCallable; + } + + public UnaryCallable + updateCertificateRevocationListCallable() { + return updateCertificateRevocationListCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + createReusableConfigOperationCallable() { + return createReusableConfigOperationCallable; + } + + public UnaryCallable createReusableConfigCallable() { + return createReusableConfigCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + deleteReusableConfigOperationCallable() { + return deleteReusableConfigOperationCallable; + } + + public UnaryCallable deleteReusableConfigCallable() { + return deleteReusableConfigCallable; + } + + public UnaryCallable getReusableConfigCallable() { + return getReusableConfigCallable; + } + + public UnaryCallable + listReusableConfigsPagedCallable() { + return listReusableConfigsPagedCallable; + } + + public UnaryCallable + listReusableConfigsCallable() { + return listReusableConfigsCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + updateReusableConfigOperationCallable() { + return updateReusableConfigOperationCallable; + } + + public UnaryCallable updateReusableConfigCallable() { + return updateReusableConfigCallable; + } + + @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-security-privateca/src/test/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceClientTest.java b/google-cloud-security-privateca/src/test/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceClientTest.java new file mode 100644 index 00000000..8180da35 --- /dev/null +++ b/google-cloud-security-privateca/src/test/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceClientTest.java @@ -0,0 +1,1366 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1; + +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificateAuthoritiesPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListCertificatesPagedResponse; +import static com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient.ListReusableConfigsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class CertificateAuthorityServiceClientTest { + private static MockCertificateAuthorityService mockCertificateAuthorityService; + private static MockServiceHelper serviceHelper; + private CertificateAuthorityServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockCertificateAuthorityService = new MockCertificateAuthorityService(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockCertificateAuthorityService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + CertificateAuthorityServiceSettings settings = + CertificateAuthorityServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CertificateAuthorityServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void createCertificateTest() { + CertificateName name = + CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]"); + String pemCsr = "pemCsr-683665829"; + String pemCertificate = "pemCertificate1234463984"; + Certificate expectedResponse = + Certificate.newBuilder() + .setName(name.toString()) + .setPemCsr(pemCsr) + .setPemCertificate(pemCertificate) + .build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + CertificateAuthorityName parent = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + Certificate certificate = Certificate.newBuilder().build(); + String certificateId = "certificateId1494430915"; + + Certificate actualResponse = client.createCertificate(parent, certificate, certificateId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCertificateRequest actualRequest = (CreateCertificateRequest) actualRequests.get(0); + + Assert.assertEquals(parent, CertificateAuthorityName.parse(actualRequest.getParent())); + Assert.assertEquals(certificate, actualRequest.getCertificate()); + Assert.assertEquals(certificateId, actualRequest.getCertificateId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthorityName parent = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + Certificate certificate = Certificate.newBuilder().build(); + String certificateId = "certificateId1494430915"; + + client.createCertificate(parent, certificate, certificateId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getCertificateTest() { + CertificateName name2 = + CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]"); + String pemCsr = "pemCsr-683665829"; + String pemCertificate = "pemCertificate1234463984"; + Certificate expectedResponse = + Certificate.newBuilder() + .setName(name2.toString()) + .setPemCsr(pemCsr) + .setPemCertificate(pemCertificate) + .build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + CertificateName name = + CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]"); + + Certificate actualResponse = client.getCertificate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCertificateRequest actualRequest = (GetCertificateRequest) actualRequests.get(0); + + Assert.assertEquals(name, CertificateName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateName name = + CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]"); + + client.getCertificate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listCertificatesTest() { + String nextPageToken = ""; + Certificate certificatesElement = Certificate.newBuilder().build(); + List certificates = Arrays.asList(certificatesElement); + ListCertificatesResponse expectedResponse = + ListCertificatesResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllCertificates(certificates) + .build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + CertificateAuthorityName parent = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + ListCertificatesPagedResponse pagedListResponse = client.listCertificates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCertificatesList().get(0), resources.get(0)); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCertificatesRequest actualRequest = (ListCertificatesRequest) actualRequests.get(0); + + Assert.assertEquals(parent, CertificateAuthorityName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listCertificatesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthorityName parent = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + client.listCertificates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void revokeCertificateTest() { + CertificateName name2 = + CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]"); + String pemCsr = "pemCsr-683665829"; + String pemCertificate = "pemCertificate1234463984"; + Certificate expectedResponse = + Certificate.newBuilder() + .setName(name2.toString()) + .setPemCsr(pemCsr) + .setPemCertificate(pemCertificate) + .build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + CertificateName name = + CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]"); + + Certificate actualResponse = client.revokeCertificate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RevokeCertificateRequest actualRequest = (RevokeCertificateRequest) actualRequests.get(0); + + Assert.assertEquals(name, CertificateName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void revokeCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateName name = + CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]"); + + client.revokeCertificate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateCertificateTest() { + CertificateName name = + CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]"); + String pemCsr = "pemCsr-683665829"; + String pemCertificate = "pemCertificate1234463984"; + Certificate expectedResponse = + Certificate.newBuilder() + .setName(name.toString()) + .setPemCsr(pemCsr) + .setPemCertificate(pemCertificate) + .build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + Certificate certificate = Certificate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Certificate actualResponse = client.updateCertificate(certificate, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCertificateRequest actualRequest = (UpdateCertificateRequest) actualRequests.get(0); + + Assert.assertEquals(certificate, actualRequest.getCertificate()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + Certificate certificate = Certificate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateCertificate(certificate, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void activateCertificateAuthorityTest() throws Exception { + CertificateAuthorityName name2 = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + String gcsBucket = "gcsBucket-1720393710"; + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder().setName(name2.toString()).setGcsBucket(gcsBucket).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("activateCertificateAuthorityTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + CertificateAuthority actualResponse = client.activateCertificateAuthorityAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ActivateCertificateAuthorityRequest actualRequest = + (ActivateCertificateAuthorityRequest) actualRequests.get(0); + + Assert.assertEquals(name, CertificateAuthorityName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void activateCertificateAuthorityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + client.activateCertificateAuthorityAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void createCertificateAuthorityTest() throws Exception { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + String gcsBucket = "gcsBucket-1720393710"; + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder().setName(name.toString()).setGcsBucket(gcsBucket).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCertificateAuthorityTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build(); + String certificateAuthorityId = "certificateAuthorityId561919295"; + + CertificateAuthority actualResponse = + client + .createCertificateAuthorityAsync(parent, certificateAuthority, certificateAuthorityId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCertificateAuthorityRequest actualRequest = + (CreateCertificateAuthorityRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(certificateAuthority, actualRequest.getCertificateAuthority()); + Assert.assertEquals(certificateAuthorityId, actualRequest.getCertificateAuthorityId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createCertificateAuthorityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build(); + String certificateAuthorityId = "certificateAuthorityId561919295"; + + client + .createCertificateAuthorityAsync(parent, certificateAuthority, certificateAuthorityId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void disableCertificateAuthorityTest() throws Exception { + CertificateAuthorityName name2 = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + String gcsBucket = "gcsBucket-1720393710"; + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder().setName(name2.toString()).setGcsBucket(gcsBucket).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("disableCertificateAuthorityTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + CertificateAuthority actualResponse = client.disableCertificateAuthorityAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DisableCertificateAuthorityRequest actualRequest = + (DisableCertificateAuthorityRequest) actualRequests.get(0); + + Assert.assertEquals(name, CertificateAuthorityName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void disableCertificateAuthorityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + client.disableCertificateAuthorityAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void enableCertificateAuthorityTest() throws Exception { + CertificateAuthorityName name2 = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + String gcsBucket = "gcsBucket-1720393710"; + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder().setName(name2.toString()).setGcsBucket(gcsBucket).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("enableCertificateAuthorityTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + CertificateAuthority actualResponse = client.enableCertificateAuthorityAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + EnableCertificateAuthorityRequest actualRequest = + (EnableCertificateAuthorityRequest) actualRequests.get(0); + + Assert.assertEquals(name, CertificateAuthorityName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void enableCertificateAuthorityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + client.enableCertificateAuthorityAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void fetchCertificateAuthorityCsrTest() { + String pemCsr = "pemCsr-683665829"; + FetchCertificateAuthorityCsrResponse expectedResponse = + FetchCertificateAuthorityCsrResponse.newBuilder().setPemCsr(pemCsr).build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + FetchCertificateAuthorityCsrResponse actualResponse = client.fetchCertificateAuthorityCsr(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchCertificateAuthorityCsrRequest actualRequest = + (FetchCertificateAuthorityCsrRequest) actualRequests.get(0); + + Assert.assertEquals(name, CertificateAuthorityName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void fetchCertificateAuthorityCsrExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + client.fetchCertificateAuthorityCsr(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getCertificateAuthorityTest() { + CertificateAuthorityName name2 = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + String gcsBucket = "gcsBucket-1720393710"; + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder().setName(name2.toString()).setGcsBucket(gcsBucket).build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + CertificateAuthority actualResponse = client.getCertificateAuthority(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCertificateAuthorityRequest actualRequest = + (GetCertificateAuthorityRequest) actualRequests.get(0); + + Assert.assertEquals(name, CertificateAuthorityName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getCertificateAuthorityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + client.getCertificateAuthority(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listCertificateAuthoritiesTest() { + String nextPageToken = ""; + CertificateAuthority certificateAuthoritiesElement = CertificateAuthority.newBuilder().build(); + List certificateAuthorities = + Arrays.asList(certificateAuthoritiesElement); + ListCertificateAuthoritiesResponse expectedResponse = + ListCertificateAuthoritiesResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllCertificateAuthorities(certificateAuthorities) + .build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListCertificateAuthoritiesPagedResponse pagedListResponse = + client.listCertificateAuthorities(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCertificateAuthoritiesList().get(0), resources.get(0)); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCertificateAuthoritiesRequest actualRequest = + (ListCertificateAuthoritiesRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listCertificateAuthoritiesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + client.listCertificateAuthorities(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void restoreCertificateAuthorityTest() throws Exception { + CertificateAuthorityName name2 = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + String gcsBucket = "gcsBucket-1720393710"; + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder().setName(name2.toString()).setGcsBucket(gcsBucket).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreCertificateAuthorityTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + CertificateAuthority actualResponse = client.restoreCertificateAuthorityAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreCertificateAuthorityRequest actualRequest = + (RestoreCertificateAuthorityRequest) actualRequests.get(0); + + Assert.assertEquals(name, CertificateAuthorityName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void restoreCertificateAuthorityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + client.restoreCertificateAuthorityAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void scheduleDeleteCertificateAuthorityTest() throws Exception { + CertificateAuthorityName name2 = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + String gcsBucket = "gcsBucket-1720393710"; + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder().setName(name2.toString()).setGcsBucket(gcsBucket).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("scheduleDeleteCertificateAuthorityTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + CertificateAuthority actualResponse = + client.scheduleDeleteCertificateAuthorityAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ScheduleDeleteCertificateAuthorityRequest actualRequest = + (ScheduleDeleteCertificateAuthorityRequest) actualRequests.get(0); + + Assert.assertEquals(name, CertificateAuthorityName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void scheduleDeleteCertificateAuthorityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + client.scheduleDeleteCertificateAuthorityAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void updateCertificateAuthorityTest() throws Exception { + CertificateAuthorityName name = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + String gcsBucket = "gcsBucket-1720393710"; + CertificateAuthority expectedResponse = + CertificateAuthority.newBuilder().setName(name.toString()).setGcsBucket(gcsBucket).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateCertificateAuthorityTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + CertificateAuthority actualResponse = + client.updateCertificateAuthorityAsync(certificateAuthority, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCertificateAuthorityRequest actualRequest = + (UpdateCertificateAuthorityRequest) actualRequests.get(0); + + Assert.assertEquals(certificateAuthority, actualRequest.getCertificateAuthority()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateCertificateAuthorityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateCertificateAuthorityAsync(certificateAuthority, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void createCertificateRevocationListTest() throws Exception { + CertificateRevocationListName name = + CertificateRevocationListName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]"); + long sequenceNumber = 1309190777L; + String pemCrl = "pemCrl-683665866"; + String accessUrl = "accessUrl-1141680108"; + CertificateRevocationList expectedResponse = + CertificateRevocationList.newBuilder() + .setName(name.toString()) + .setSequenceNumber(sequenceNumber) + .setPemCrl(pemCrl) + .setAccessUrl(accessUrl) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCertificateRevocationListTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + CertificateAuthorityName parent = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + CertificateRevocationList certificateRevocationList = + CertificateRevocationList.newBuilder().build(); + String certificateRevocationListId = "certificateRevocationListId1847074915"; + + CertificateRevocationList actualResponse = + client + .createCertificateRevocationListAsync( + parent, certificateRevocationList, certificateRevocationListId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCertificateRevocationListRequest actualRequest = + (CreateCertificateRevocationListRequest) actualRequests.get(0); + + Assert.assertEquals(parent, CertificateAuthorityName.parse(actualRequest.getParent())); + Assert.assertEquals(certificateRevocationList, actualRequest.getCertificateRevocationList()); + Assert.assertEquals( + certificateRevocationListId, actualRequest.getCertificateRevocationListId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createCertificateRevocationListExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthorityName parent = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + CertificateRevocationList certificateRevocationList = + CertificateRevocationList.newBuilder().build(); + String certificateRevocationListId = "certificateRevocationListId1847074915"; + + client + .createCertificateRevocationListAsync( + parent, certificateRevocationList, certificateRevocationListId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void getCertificateRevocationListTest() { + CertificateRevocationListName name2 = + CertificateRevocationListName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]"); + long sequenceNumber = 1309190777L; + String pemCrl = "pemCrl-683665866"; + String accessUrl = "accessUrl-1141680108"; + CertificateRevocationList expectedResponse = + CertificateRevocationList.newBuilder() + .setName(name2.toString()) + .setSequenceNumber(sequenceNumber) + .setPemCrl(pemCrl) + .setAccessUrl(accessUrl) + .build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + CertificateRevocationListName name = + CertificateRevocationListName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]"); + + CertificateRevocationList actualResponse = client.getCertificateRevocationList(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCertificateRevocationListRequest actualRequest = + (GetCertificateRevocationListRequest) actualRequests.get(0); + + Assert.assertEquals(name, CertificateRevocationListName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getCertificateRevocationListExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateRevocationListName name = + CertificateRevocationListName.of( + "[PROJECT]", + "[LOCATION]", + "[CERTIFICATE_AUTHORITY]", + "[CERTIFICATE_REVOCATION_LIST]"); + + client.getCertificateRevocationList(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listCertificateRevocationListsTest() { + String nextPageToken = ""; + CertificateRevocationList certificateRevocationListsElement = + CertificateRevocationList.newBuilder().build(); + List certificateRevocationLists = + Arrays.asList(certificateRevocationListsElement); + ListCertificateRevocationListsResponse expectedResponse = + ListCertificateRevocationListsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllCertificateRevocationLists(certificateRevocationLists) + .build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + CertificateAuthorityName parent = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + ListCertificateRevocationListsPagedResponse pagedListResponse = + client.listCertificateRevocationLists(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getCertificateRevocationListsList().get(0), resources.get(0)); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCertificateRevocationListsRequest actualRequest = + (ListCertificateRevocationListsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, CertificateAuthorityName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listCertificateRevocationListsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateAuthorityName parent = + CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]"); + + client.listCertificateRevocationLists(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateCertificateRevocationListTest() throws Exception { + CertificateRevocationListName name = + CertificateRevocationListName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]"); + long sequenceNumber = 1309190777L; + String pemCrl = "pemCrl-683665866"; + String accessUrl = "accessUrl-1141680108"; + CertificateRevocationList expectedResponse = + CertificateRevocationList.newBuilder() + .setName(name.toString()) + .setSequenceNumber(sequenceNumber) + .setPemCrl(pemCrl) + .setAccessUrl(accessUrl) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateCertificateRevocationListTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + CertificateRevocationList certificateRevocationList = + CertificateRevocationList.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + CertificateRevocationList actualResponse = + client.updateCertificateRevocationListAsync(certificateRevocationList, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCertificateRevocationListRequest actualRequest = + (UpdateCertificateRevocationListRequest) actualRequests.get(0); + + Assert.assertEquals(certificateRevocationList, actualRequest.getCertificateRevocationList()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateCertificateRevocationListExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + CertificateRevocationList certificateRevocationList = + CertificateRevocationList.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateCertificateRevocationListAsync(certificateRevocationList, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void createReusableConfigTest() throws Exception { + ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]"); + String description = "description-1724546052"; + ReusableConfig expectedResponse = + ReusableConfig.newBuilder().setName(name.toString()).setDescription(description).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createReusableConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ReusableConfig reusableConfig = ReusableConfig.newBuilder().build(); + String reusableConfigId = "reusableConfigId685940964"; + + ReusableConfig actualResponse = + client.createReusableConfigAsync(parent, reusableConfig, reusableConfigId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReusableConfigRequest actualRequest = (CreateReusableConfigRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(reusableConfig, actualRequest.getReusableConfig()); + Assert.assertEquals(reusableConfigId, actualRequest.getReusableConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createReusableConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ReusableConfig reusableConfig = ReusableConfig.newBuilder().build(); + String reusableConfigId = "reusableConfigId685940964"; + + client.createReusableConfigAsync(parent, reusableConfig, reusableConfigId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void deleteReusableConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteReusableConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]"); + + Empty actualResponse = client.deleteReusableConfigAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteReusableConfigRequest actualRequest = (DeleteReusableConfigRequest) actualRequests.get(0); + + Assert.assertEquals(name, ReusableConfigName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteReusableConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + ReusableConfigName name = + ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]"); + + client.deleteReusableConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void getReusableConfigTest() { + ReusableConfigName name2 = + ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]"); + String description = "description-1724546052"; + ReusableConfig expectedResponse = + ReusableConfig.newBuilder().setName(name2.toString()).setDescription(description).build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]"); + + ReusableConfig actualResponse = client.getReusableConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReusableConfigRequest actualRequest = (GetReusableConfigRequest) actualRequests.get(0); + + Assert.assertEquals(name, ReusableConfigName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getReusableConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + ReusableConfigName name = + ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]"); + + client.getReusableConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listReusableConfigsTest() { + String nextPageToken = ""; + ReusableConfig reusableConfigsElement = ReusableConfig.newBuilder().build(); + List reusableConfigs = Arrays.asList(reusableConfigsElement); + ListReusableConfigsResponse expectedResponse = + ListReusableConfigsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllReusableConfigs(reusableConfigs) + .build(); + mockCertificateAuthorityService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListReusableConfigsPagedResponse pagedListResponse = client.listReusableConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReusableConfigsList().get(0), resources.get(0)); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReusableConfigsRequest actualRequest = (ListReusableConfigsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listReusableConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + client.listReusableConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateReusableConfigTest() throws Exception { + ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]"); + String description = "description-1724546052"; + ReusableConfig expectedResponse = + ReusableConfig.newBuilder().setName(name.toString()).setDescription(description).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateReusableConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateAuthorityService.addResponse(resultOperation); + + ReusableConfig reusableConfig = ReusableConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ReusableConfig actualResponse = + client.updateReusableConfigAsync(reusableConfig, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateAuthorityService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateReusableConfigRequest actualRequest = (UpdateReusableConfigRequest) actualRequests.get(0); + + Assert.assertEquals(reusableConfig, actualRequest.getReusableConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateReusableConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCertificateAuthorityService.addException(exception); + + try { + ReusableConfig reusableConfig = ReusableConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateReusableConfigAsync(reusableConfig, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/google-cloud-security-privateca/src/test/java/com/google/cloud/security/privateca/v1beta1/MockCertificateAuthorityService.java b/google-cloud-security-privateca/src/test/java/com/google/cloud/security/privateca/v1beta1/MockCertificateAuthorityService.java new file mode 100644 index 00000000..ebe6d8c7 --- /dev/null +++ b/google-cloud-security-privateca/src/test/java/com/google/cloud/security/privateca/v1beta1/MockCertificateAuthorityService.java @@ -0,0 +1,57 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockCertificateAuthorityService implements MockGrpcService { + private final MockCertificateAuthorityServiceImpl serviceImpl; + + public MockCertificateAuthorityService() { + serviceImpl = new MockCertificateAuthorityServiceImpl(); + } + + @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-security-privateca/src/test/java/com/google/cloud/security/privateca/v1beta1/MockCertificateAuthorityServiceImpl.java b/google-cloud-security-privateca/src/test/java/com/google/cloud/security/privateca/v1beta1/MockCertificateAuthorityServiceImpl.java new file mode 100644 index 00000000..1afd1b71 --- /dev/null +++ b/google-cloud-security-privateca/src/test/java/com/google/cloud/security/privateca/v1beta1/MockCertificateAuthorityServiceImpl.java @@ -0,0 +1,426 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceGrpc.CertificateAuthorityServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockCertificateAuthorityServiceImpl extends CertificateAuthorityServiceImplBase { + private List requests; + private Queue responses; + + public MockCertificateAuthorityServiceImpl() { + 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 createCertificate( + CreateCertificateRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Certificate) { + requests.add(request); + responseObserver.onNext((Certificate) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getCertificate( + GetCertificateRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Certificate) { + requests.add(request); + responseObserver.onNext((Certificate) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listCertificates( + ListCertificatesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListCertificatesResponse) { + requests.add(request); + responseObserver.onNext((ListCertificatesResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void revokeCertificate( + RevokeCertificateRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Certificate) { + requests.add(request); + responseObserver.onNext((Certificate) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateCertificate( + UpdateCertificateRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Certificate) { + requests.add(request); + responseObserver.onNext((Certificate) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void activateCertificateAuthority( + ActivateCertificateAuthorityRequest 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 createCertificateAuthority( + CreateCertificateAuthorityRequest 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 disableCertificateAuthority( + DisableCertificateAuthorityRequest 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 enableCertificateAuthority( + EnableCertificateAuthorityRequest 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 fetchCertificateAuthorityCsr( + FetchCertificateAuthorityCsrRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof FetchCertificateAuthorityCsrResponse) { + requests.add(request); + responseObserver.onNext((FetchCertificateAuthorityCsrResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getCertificateAuthority( + GetCertificateAuthorityRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof CertificateAuthority) { + requests.add(request); + responseObserver.onNext((CertificateAuthority) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listCertificateAuthorities( + ListCertificateAuthoritiesRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListCertificateAuthoritiesResponse) { + requests.add(request); + responseObserver.onNext((ListCertificateAuthoritiesResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void restoreCertificateAuthority( + RestoreCertificateAuthorityRequest 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 scheduleDeleteCertificateAuthority( + ScheduleDeleteCertificateAuthorityRequest 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 updateCertificateAuthority( + UpdateCertificateAuthorityRequest 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 createCertificateRevocationList( + CreateCertificateRevocationListRequest 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 getCertificateRevocationList( + GetCertificateRevocationListRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof CertificateRevocationList) { + requests.add(request); + responseObserver.onNext((CertificateRevocationList) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listCertificateRevocationLists( + ListCertificateRevocationListsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListCertificateRevocationListsResponse) { + requests.add(request); + responseObserver.onNext((ListCertificateRevocationListsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateCertificateRevocationList( + UpdateCertificateRevocationListRequest 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 createReusableConfig( + CreateReusableConfigRequest 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 deleteReusableConfig( + DeleteReusableConfigRequest 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 getReusableConfig( + GetReusableConfigRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ReusableConfig) { + requests.add(request); + responseObserver.onNext((ReusableConfig) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listReusableConfigs( + ListReusableConfigsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListReusableConfigsResponse) { + requests.add(request); + responseObserver.onNext((ListReusableConfigsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateReusableConfig( + UpdateReusableConfigRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/grpc-google-cloud-security-privateca-v1beta1/pom.xml b/grpc-google-cloud-security-privateca-v1beta1/pom.xml new file mode 100644 index 00000000..df8aab2d --- /dev/null +++ b/grpc-google-cloud-security-privateca-v1beta1/pom.xml @@ -0,0 +1,65 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-security-privateca-v1beta1 + 0.0.1-SNAPSHOT + grpc-google-cloud-security-privateca-v1beta1 + GRPC library for google-cloud-security-privateca + + com.google.cloud + google-cloud-security-privateca-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-security-privateca-v1beta1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceGrpc.java b/grpc-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceGrpc.java new file mode 100644 index 00000000..bebd5bf0 --- /dev/null +++ b/grpc-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceGrpc.java @@ -0,0 +1,3389 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1; + +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; + +/** + * + * + *
+ * [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private
+ * certificate authorities and issued certificates.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/security/privateca/v1beta1/service.proto") +public final class CertificateAuthorityServiceGrpc { + + private CertificateAuthorityServiceGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getCreateCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCertificate", + requestType = com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest.class, + responseType = com.google.cloud.security.privateca.v1beta1.Certificate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getCreateCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getCreateCertificateMethod; + if ((getCreateCertificateMethod = CertificateAuthorityServiceGrpc.getCreateCertificateMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getCreateCertificateMethod = + CertificateAuthorityServiceGrpc.getCreateCertificateMethod) + == null) { + CertificateAuthorityServiceGrpc.getCreateCertificateMethod = + getCreateCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.Certificate + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "CreateCertificate")) + .build(); + } + } + } + return getCreateCertificateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getGetCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCertificate", + requestType = com.google.cloud.security.privateca.v1beta1.GetCertificateRequest.class, + responseType = com.google.cloud.security.privateca.v1beta1.Certificate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getGetCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getGetCertificateMethod; + if ((getGetCertificateMethod = CertificateAuthorityServiceGrpc.getGetCertificateMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getGetCertificateMethod = CertificateAuthorityServiceGrpc.getGetCertificateMethod) + == null) { + CertificateAuthorityServiceGrpc.getGetCertificateMethod = + getGetCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.Certificate + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier("GetCertificate")) + .build(); + } + } + } + return getGetCertificateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest, + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse> + getListCertificatesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCertificates", + requestType = com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest.class, + responseType = com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest, + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse> + getListCertificatesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest, + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse> + getListCertificatesMethod; + if ((getListCertificatesMethod = CertificateAuthorityServiceGrpc.getListCertificatesMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getListCertificatesMethod = CertificateAuthorityServiceGrpc.getListCertificatesMethod) + == null) { + CertificateAuthorityServiceGrpc.getListCertificatesMethod = + getListCertificatesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCertificates")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "ListCertificates")) + .build(); + } + } + } + return getListCertificatesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getRevokeCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RevokeCertificate", + requestType = com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest.class, + responseType = com.google.cloud.security.privateca.v1beta1.Certificate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getRevokeCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getRevokeCertificateMethod; + if ((getRevokeCertificateMethod = CertificateAuthorityServiceGrpc.getRevokeCertificateMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getRevokeCertificateMethod = + CertificateAuthorityServiceGrpc.getRevokeCertificateMethod) + == null) { + CertificateAuthorityServiceGrpc.getRevokeCertificateMethod = + getRevokeCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RevokeCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.Certificate + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "RevokeCertificate")) + .build(); + } + } + } + return getRevokeCertificateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getUpdateCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCertificate", + requestType = com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.class, + responseType = com.google.cloud.security.privateca.v1beta1.Certificate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getUpdateCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate> + getUpdateCertificateMethod; + if ((getUpdateCertificateMethod = CertificateAuthorityServiceGrpc.getUpdateCertificateMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getUpdateCertificateMethod = + CertificateAuthorityServiceGrpc.getUpdateCertificateMethod) + == null) { + CertificateAuthorityServiceGrpc.getUpdateCertificateMethod = + getUpdateCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.Certificate + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "UpdateCertificate")) + .build(); + } + } + } + return getUpdateCertificateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest, + com.google.longrunning.Operation> + getActivateCertificateAuthorityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ActivateCertificateAuthority", + requestType = + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest, + com.google.longrunning.Operation> + getActivateCertificateAuthorityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest, + com.google.longrunning.Operation> + getActivateCertificateAuthorityMethod; + if ((getActivateCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getActivateCertificateAuthorityMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getActivateCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getActivateCertificateAuthorityMethod) + == null) { + CertificateAuthorityServiceGrpc.getActivateCertificateAuthorityMethod = + getActivateCertificateAuthorityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ActivateCertificateAuthority")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .ActivateCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "ActivateCertificateAuthority")) + .build(); + } + } + } + return getActivateCertificateAuthorityMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest, + com.google.longrunning.Operation> + getCreateCertificateAuthorityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCertificateAuthority", + requestType = + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest, + com.google.longrunning.Operation> + getCreateCertificateAuthorityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest, + com.google.longrunning.Operation> + getCreateCertificateAuthorityMethod; + if ((getCreateCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getCreateCertificateAuthorityMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getCreateCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getCreateCertificateAuthorityMethod) + == null) { + CertificateAuthorityServiceGrpc.getCreateCertificateAuthorityMethod = + getCreateCertificateAuthorityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateCertificateAuthority")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .CreateCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "CreateCertificateAuthority")) + .build(); + } + } + } + return getCreateCertificateAuthorityMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest, + com.google.longrunning.Operation> + getDisableCertificateAuthorityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DisableCertificateAuthority", + requestType = + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest, + com.google.longrunning.Operation> + getDisableCertificateAuthorityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest, + com.google.longrunning.Operation> + getDisableCertificateAuthorityMethod; + if ((getDisableCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getDisableCertificateAuthorityMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getDisableCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getDisableCertificateAuthorityMethod) + == null) { + CertificateAuthorityServiceGrpc.getDisableCertificateAuthorityMethod = + getDisableCertificateAuthorityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DisableCertificateAuthority")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .DisableCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "DisableCertificateAuthority")) + .build(); + } + } + } + return getDisableCertificateAuthorityMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest, + com.google.longrunning.Operation> + getEnableCertificateAuthorityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "EnableCertificateAuthority", + requestType = + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest, + com.google.longrunning.Operation> + getEnableCertificateAuthorityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest, + com.google.longrunning.Operation> + getEnableCertificateAuthorityMethod; + if ((getEnableCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getEnableCertificateAuthorityMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getEnableCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getEnableCertificateAuthorityMethod) + == null) { + CertificateAuthorityServiceGrpc.getEnableCertificateAuthorityMethod = + getEnableCertificateAuthorityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "EnableCertificateAuthority")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .EnableCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "EnableCertificateAuthority")) + .build(); + } + } + } + return getEnableCertificateAuthorityMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest, + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse> + getFetchCertificateAuthorityCsrMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FetchCertificateAuthorityCsr", + requestType = + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest.class, + responseType = + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest, + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse> + getFetchCertificateAuthorityCsrMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest, + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse> + getFetchCertificateAuthorityCsrMethod; + if ((getFetchCertificateAuthorityCsrMethod = + CertificateAuthorityServiceGrpc.getFetchCertificateAuthorityCsrMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getFetchCertificateAuthorityCsrMethod = + CertificateAuthorityServiceGrpc.getFetchCertificateAuthorityCsrMethod) + == null) { + CertificateAuthorityServiceGrpc.getFetchCertificateAuthorityCsrMethod = + getFetchCertificateAuthorityCsrMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "FetchCertificateAuthorityCsr")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .FetchCertificateAuthorityCsrRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .FetchCertificateAuthorityCsrResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "FetchCertificateAuthorityCsr")) + .build(); + } + } + } + return getFetchCertificateAuthorityCsrMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority> + getGetCertificateAuthorityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCertificateAuthority", + requestType = + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest.class, + responseType = com.google.cloud.security.privateca.v1beta1.CertificateAuthority.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority> + getGetCertificateAuthorityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority> + getGetCertificateAuthorityMethod; + if ((getGetCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getGetCertificateAuthorityMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getGetCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getGetCertificateAuthorityMethod) + == null) { + CertificateAuthorityServiceGrpc.getGetCertificateAuthorityMethod = + getGetCertificateAuthorityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetCertificateAuthority")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .GetCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "GetCertificateAuthority")) + .build(); + } + } + } + return getGetCertificateAuthorityMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest, + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse> + getListCertificateAuthoritiesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCertificateAuthorities", + requestType = + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest.class, + responseType = + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest, + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse> + getListCertificateAuthoritiesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest, + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse> + getListCertificateAuthoritiesMethod; + if ((getListCertificateAuthoritiesMethod = + CertificateAuthorityServiceGrpc.getListCertificateAuthoritiesMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getListCertificateAuthoritiesMethod = + CertificateAuthorityServiceGrpc.getListCertificateAuthoritiesMethod) + == null) { + CertificateAuthorityServiceGrpc.getListCertificateAuthoritiesMethod = + getListCertificateAuthoritiesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListCertificateAuthorities")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .ListCertificateAuthoritiesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .ListCertificateAuthoritiesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "ListCertificateAuthorities")) + .build(); + } + } + } + return getListCertificateAuthoritiesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest, + com.google.longrunning.Operation> + getRestoreCertificateAuthorityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestoreCertificateAuthority", + requestType = + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest, + com.google.longrunning.Operation> + getRestoreCertificateAuthorityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest, + com.google.longrunning.Operation> + getRestoreCertificateAuthorityMethod; + if ((getRestoreCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getRestoreCertificateAuthorityMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getRestoreCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getRestoreCertificateAuthorityMethod) + == null) { + CertificateAuthorityServiceGrpc.getRestoreCertificateAuthorityMethod = + getRestoreCertificateAuthorityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RestoreCertificateAuthority")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .RestoreCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "RestoreCertificateAuthority")) + .build(); + } + } + } + return getRestoreCertificateAuthorityMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest, + com.google.longrunning.Operation> + getScheduleDeleteCertificateAuthorityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ScheduleDeleteCertificateAuthority", + requestType = + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + .class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest, + com.google.longrunning.Operation> + getScheduleDeleteCertificateAuthorityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest, + com.google.longrunning.Operation> + getScheduleDeleteCertificateAuthorityMethod; + if ((getScheduleDeleteCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getScheduleDeleteCertificateAuthorityMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getScheduleDeleteCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getScheduleDeleteCertificateAuthorityMethod) + == null) { + CertificateAuthorityServiceGrpc.getScheduleDeleteCertificateAuthorityMethod = + getScheduleDeleteCertificateAuthorityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "ScheduleDeleteCertificateAuthority")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "ScheduleDeleteCertificateAuthority")) + .build(); + } + } + } + return getScheduleDeleteCertificateAuthorityMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest, + com.google.longrunning.Operation> + getUpdateCertificateAuthorityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCertificateAuthority", + requestType = + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest, + com.google.longrunning.Operation> + getUpdateCertificateAuthorityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest, + com.google.longrunning.Operation> + getUpdateCertificateAuthorityMethod; + if ((getUpdateCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getUpdateCertificateAuthorityMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getUpdateCertificateAuthorityMethod = + CertificateAuthorityServiceGrpc.getUpdateCertificateAuthorityMethod) + == null) { + CertificateAuthorityServiceGrpc.getUpdateCertificateAuthorityMethod = + getUpdateCertificateAuthorityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateCertificateAuthority")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .UpdateCertificateAuthorityRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "UpdateCertificateAuthority")) + .build(); + } + } + } + return getUpdateCertificateAuthorityMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest, + com.google.longrunning.Operation> + getCreateCertificateRevocationListMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCertificateRevocationList", + requestType = + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest, + com.google.longrunning.Operation> + getCreateCertificateRevocationListMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest, + com.google.longrunning.Operation> + getCreateCertificateRevocationListMethod; + if ((getCreateCertificateRevocationListMethod = + CertificateAuthorityServiceGrpc.getCreateCertificateRevocationListMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getCreateCertificateRevocationListMethod = + CertificateAuthorityServiceGrpc.getCreateCertificateRevocationListMethod) + == null) { + CertificateAuthorityServiceGrpc.getCreateCertificateRevocationListMethod = + getCreateCertificateRevocationListMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateCertificateRevocationList")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .CreateCertificateRevocationListRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "CreateCertificateRevocationList")) + .build(); + } + } + } + return getCreateCertificateRevocationListMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList> + getGetCertificateRevocationListMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCertificateRevocationList", + requestType = + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.class, + responseType = com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList> + getGetCertificateRevocationListMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList> + getGetCertificateRevocationListMethod; + if ((getGetCertificateRevocationListMethod = + CertificateAuthorityServiceGrpc.getGetCertificateRevocationListMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getGetCertificateRevocationListMethod = + CertificateAuthorityServiceGrpc.getGetCertificateRevocationListMethod) + == null) { + CertificateAuthorityServiceGrpc.getGetCertificateRevocationListMethod = + getGetCertificateRevocationListMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetCertificateRevocationList")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .GetCertificateRevocationListRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "GetCertificateRevocationList")) + .build(); + } + } + } + return getGetCertificateRevocationListMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest, + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse> + getListCertificateRevocationListsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCertificateRevocationLists", + requestType = + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest.class, + responseType = + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest, + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse> + getListCertificateRevocationListsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest, + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse> + getListCertificateRevocationListsMethod; + if ((getListCertificateRevocationListsMethod = + CertificateAuthorityServiceGrpc.getListCertificateRevocationListsMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getListCertificateRevocationListsMethod = + CertificateAuthorityServiceGrpc.getListCertificateRevocationListsMethod) + == null) { + CertificateAuthorityServiceGrpc.getListCertificateRevocationListsMethod = + getListCertificateRevocationListsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListCertificateRevocationLists")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .ListCertificateRevocationListsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .ListCertificateRevocationListsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "ListCertificateRevocationLists")) + .build(); + } + } + } + return getListCertificateRevocationListsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest, + com.google.longrunning.Operation> + getUpdateCertificateRevocationListMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCertificateRevocationList", + requestType = + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest, + com.google.longrunning.Operation> + getUpdateCertificateRevocationListMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest, + com.google.longrunning.Operation> + getUpdateCertificateRevocationListMethod; + if ((getUpdateCertificateRevocationListMethod = + CertificateAuthorityServiceGrpc.getUpdateCertificateRevocationListMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getUpdateCertificateRevocationListMethod = + CertificateAuthorityServiceGrpc.getUpdateCertificateRevocationListMethod) + == null) { + CertificateAuthorityServiceGrpc.getUpdateCertificateRevocationListMethod = + getUpdateCertificateRevocationListMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateCertificateRevocationList")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .UpdateCertificateRevocationListRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "UpdateCertificateRevocationList")) + .build(); + } + } + } + return getUpdateCertificateRevocationListMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest, + com.google.longrunning.Operation> + getCreateReusableConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateReusableConfig", + requestType = com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest, + com.google.longrunning.Operation> + getCreateReusableConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest, + com.google.longrunning.Operation> + getCreateReusableConfigMethod; + if ((getCreateReusableConfigMethod = + CertificateAuthorityServiceGrpc.getCreateReusableConfigMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getCreateReusableConfigMethod = + CertificateAuthorityServiceGrpc.getCreateReusableConfigMethod) + == null) { + CertificateAuthorityServiceGrpc.getCreateReusableConfigMethod = + getCreateReusableConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateReusableConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .CreateReusableConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "CreateReusableConfig")) + .build(); + } + } + } + return getCreateReusableConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest, + com.google.longrunning.Operation> + getDeleteReusableConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteReusableConfig", + requestType = com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest, + com.google.longrunning.Operation> + getDeleteReusableConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest, + com.google.longrunning.Operation> + getDeleteReusableConfigMethod; + if ((getDeleteReusableConfigMethod = + CertificateAuthorityServiceGrpc.getDeleteReusableConfigMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getDeleteReusableConfigMethod = + CertificateAuthorityServiceGrpc.getDeleteReusableConfigMethod) + == null) { + CertificateAuthorityServiceGrpc.getDeleteReusableConfigMethod = + getDeleteReusableConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteReusableConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .DeleteReusableConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "DeleteReusableConfig")) + .build(); + } + } + } + return getDeleteReusableConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest, + com.google.cloud.security.privateca.v1beta1.ReusableConfig> + getGetReusableConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetReusableConfig", + requestType = com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest.class, + responseType = com.google.cloud.security.privateca.v1beta1.ReusableConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest, + com.google.cloud.security.privateca.v1beta1.ReusableConfig> + getGetReusableConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest, + com.google.cloud.security.privateca.v1beta1.ReusableConfig> + getGetReusableConfigMethod; + if ((getGetReusableConfigMethod = CertificateAuthorityServiceGrpc.getGetReusableConfigMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getGetReusableConfigMethod = + CertificateAuthorityServiceGrpc.getGetReusableConfigMethod) + == null) { + CertificateAuthorityServiceGrpc.getGetReusableConfigMethod = + getGetReusableConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetReusableConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.ReusableConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "GetReusableConfig")) + .build(); + } + } + } + return getGetReusableConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest, + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse> + getListReusableConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListReusableConfigs", + requestType = com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest.class, + responseType = com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest, + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse> + getListReusableConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest, + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse> + getListReusableConfigsMethod; + if ((getListReusableConfigsMethod = + CertificateAuthorityServiceGrpc.getListReusableConfigsMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getListReusableConfigsMethod = + CertificateAuthorityServiceGrpc.getListReusableConfigsMethod) + == null) { + CertificateAuthorityServiceGrpc.getListReusableConfigsMethod = + getListReusableConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListReusableConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .ListReusableConfigsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "ListReusableConfigs")) + .build(); + } + } + } + return getListReusableConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest, + com.google.longrunning.Operation> + getUpdateReusableConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateReusableConfig", + requestType = com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest, + com.google.longrunning.Operation> + getUpdateReusableConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest, + com.google.longrunning.Operation> + getUpdateReusableConfigMethod; + if ((getUpdateReusableConfigMethod = + CertificateAuthorityServiceGrpc.getUpdateReusableConfigMethod) + == null) { + synchronized (CertificateAuthorityServiceGrpc.class) { + if ((getUpdateReusableConfigMethod = + CertificateAuthorityServiceGrpc.getUpdateReusableConfigMethod) + == null) { + CertificateAuthorityServiceGrpc.getUpdateReusableConfigMethod = + getUpdateReusableConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateReusableConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.security.privateca.v1beta1 + .UpdateReusableConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateAuthorityServiceMethodDescriptorSupplier( + "UpdateReusableConfig")) + .build(); + } + } + } + return getUpdateReusableConfigMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CertificateAuthorityServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CertificateAuthorityServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateAuthorityServiceStub(channel, callOptions); + } + }; + return CertificateAuthorityServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CertificateAuthorityServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CertificateAuthorityServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateAuthorityServiceBlockingStub(channel, callOptions); + } + }; + return CertificateAuthorityServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CertificateAuthorityServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CertificateAuthorityServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateAuthorityServiceFutureStub(channel, callOptions); + } + }; + return CertificateAuthorityServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private
+   * certificate authorities and issued certificates.
+   * 
+ */ + public abstract static class CertificateAuthorityServiceImplBase + implements io.grpc.BindableService { + + /** + * + * + *
+     * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void createCertificate( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateCertificateMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public void getCertificate( + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetCertificateMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public void listCertificates( + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListCertificatesMethod(), responseObserver); + } + + /** + * + * + *
+     * Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public void revokeCertificate( + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getRevokeCertificateMethod(), responseObserver); + } + + /** + * + * + *
+     * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public void updateCertificate( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getUpdateCertificateMethod(), responseObserver); + } + + /** + * + * + *
+     * Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state
+     * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is
+     * of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the
+     * parent Certificate Authority signs a certificate signing request from
+     * [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation
+     * process.
+     * 
+ */ + public void activateCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getActivateCertificateAuthorityMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.
+     * 
+ */ + public void createCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateCertificateAuthorityMethod(), responseObserver); + } + + /** + * + * + *
+     * Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void disableCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDisableCertificateAuthorityMethod(), responseObserver); + } + + /** + * + * + *
+     * Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void enableCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getEnableCertificateAuthorityMethod(), responseObserver); + } + + /** + * + * + *
+     * Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * that is in state
+     * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is
+     * of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must
+     * then be signed by the desired parent Certificate Authority, which could be
+     * another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem
+     * certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].
+     * 
+ */ + public void fetchCertificateAuthorityCsr( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getFetchCertificateAuthorityCsrMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void getCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority> + responseObserver) { + asyncUnimplementedUnaryCall(getGetCertificateAuthorityMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void listCertificateAuthorities( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListCertificateAuthoritiesMethod(), responseObserver); + } + + /** + * + * + *
+     * Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.
+     * 
+ */ + public void restoreCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getRestoreCertificateAuthorityMethod(), responseObserver); + } + + /** + * + * + *
+     * Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.
+     * 
+ */ + public void scheduleDeleteCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getScheduleDeleteCertificateAuthorityMethod(), responseObserver); + } + + /** + * + * + *
+     * Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void updateCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateCertificateAuthorityMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a new [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in a given Project, Location
+     * for a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void createCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateCertificateRevocationListMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public void getCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList> + responseObserver) { + asyncUnimplementedUnaryCall(getGetCertificateRevocationListMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public void listCertificateRevocationLists( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListCertificateRevocationListsMethod(), responseObserver); + } + + /** + * + * + *
+     * Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public void updateCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateCertificateRevocationListMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a given Project and Location.
+     * 
+ */ + public void createReusableConfig( + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateReusableConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * DeleteReusableConfig deletes a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public void deleteReusableConfig( + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteReusableConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public void getReusableConfig( + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetReusableConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public void listReusableConfigs( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListReusableConfigsMethod(), responseObserver); + } + + /** + * + * + *
+     * Update a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public void updateReusableConfig( + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateReusableConfigMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateCertificateMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate>( + this, METHODID_CREATE_CERTIFICATE))) + .addMethod( + getGetCertificateMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate>( + this, METHODID_GET_CERTIFICATE))) + .addMethod( + getListCertificatesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest, + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse>( + this, METHODID_LIST_CERTIFICATES))) + .addMethod( + getRevokeCertificateMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate>( + this, METHODID_REVOKE_CERTIFICATE))) + .addMethod( + getUpdateCertificateMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest, + com.google.cloud.security.privateca.v1beta1.Certificate>( + this, METHODID_UPDATE_CERTIFICATE))) + .addMethod( + getActivateCertificateAuthorityMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1 + .ActivateCertificateAuthorityRequest, + com.google.longrunning.Operation>( + this, METHODID_ACTIVATE_CERTIFICATE_AUTHORITY))) + .addMethod( + getCreateCertificateAuthorityMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest, + com.google.longrunning.Operation>( + this, METHODID_CREATE_CERTIFICATE_AUTHORITY))) + .addMethod( + getDisableCertificateAuthorityMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1 + .DisableCertificateAuthorityRequest, + com.google.longrunning.Operation>( + this, METHODID_DISABLE_CERTIFICATE_AUTHORITY))) + .addMethod( + getEnableCertificateAuthorityMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest, + com.google.longrunning.Operation>( + this, METHODID_ENABLE_CERTIFICATE_AUTHORITY))) + .addMethod( + getFetchCertificateAuthorityCsrMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1 + .FetchCertificateAuthorityCsrRequest, + com.google.cloud.security.privateca.v1beta1 + .FetchCertificateAuthorityCsrResponse>( + this, METHODID_FETCH_CERTIFICATE_AUTHORITY_CSR))) + .addMethod( + getGetCertificateAuthorityMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority>( + this, METHODID_GET_CERTIFICATE_AUTHORITY))) + .addMethod( + getListCertificateAuthoritiesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest, + com.google.cloud.security.privateca.v1beta1 + .ListCertificateAuthoritiesResponse>( + this, METHODID_LIST_CERTIFICATE_AUTHORITIES))) + .addMethod( + getRestoreCertificateAuthorityMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1 + .RestoreCertificateAuthorityRequest, + com.google.longrunning.Operation>( + this, METHODID_RESTORE_CERTIFICATE_AUTHORITY))) + .addMethod( + getScheduleDeleteCertificateAuthorityMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest, + com.google.longrunning.Operation>( + this, METHODID_SCHEDULE_DELETE_CERTIFICATE_AUTHORITY))) + .addMethod( + getUpdateCertificateAuthorityMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest, + com.google.longrunning.Operation>( + this, METHODID_UPDATE_CERTIFICATE_AUTHORITY))) + .addMethod( + getCreateCertificateRevocationListMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1 + .CreateCertificateRevocationListRequest, + com.google.longrunning.Operation>( + this, METHODID_CREATE_CERTIFICATE_REVOCATION_LIST))) + .addMethod( + getGetCertificateRevocationListMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1 + .GetCertificateRevocationListRequest, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList>( + this, METHODID_GET_CERTIFICATE_REVOCATION_LIST))) + .addMethod( + getListCertificateRevocationListsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1 + .ListCertificateRevocationListsRequest, + com.google.cloud.security.privateca.v1beta1 + .ListCertificateRevocationListsResponse>( + this, METHODID_LIST_CERTIFICATE_REVOCATION_LISTS))) + .addMethod( + getUpdateCertificateRevocationListMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1 + .UpdateCertificateRevocationListRequest, + com.google.longrunning.Operation>( + this, METHODID_UPDATE_CERTIFICATE_REVOCATION_LIST))) + .addMethod( + getCreateReusableConfigMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_REUSABLE_CONFIG))) + .addMethod( + getDeleteReusableConfigMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_REUSABLE_CONFIG))) + .addMethod( + getGetReusableConfigMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest, + com.google.cloud.security.privateca.v1beta1.ReusableConfig>( + this, METHODID_GET_REUSABLE_CONFIG))) + .addMethod( + getListReusableConfigsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest, + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse>( + this, METHODID_LIST_REUSABLE_CONFIGS))) + .addMethod( + getUpdateReusableConfigMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_REUSABLE_CONFIG))) + .build(); + } + } + + /** + * + * + *
+   * [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private
+   * certificate authorities and issued certificates.
+   * 
+ */ + public static final class CertificateAuthorityServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private CertificateAuthorityServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CertificateAuthorityServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateAuthorityServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void createCertificate( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public void getCertificate( + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public void listCertificates( + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListCertificatesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public void revokeCertificate( + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRevokeCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public void updateCertificate( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state
+     * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is
+     * of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the
+     * parent Certificate Authority signs a certificate signing request from
+     * [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation
+     * process.
+     * 
+ */ + public void activateCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getActivateCertificateAuthorityMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.
+     * 
+ */ + public void createCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateCertificateAuthorityMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void disableCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDisableCertificateAuthorityMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void enableCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getEnableCertificateAuthorityMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * that is in state
+     * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is
+     * of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must
+     * then be signed by the desired parent Certificate Authority, which could be
+     * another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem
+     * certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].
+     * 
+ */ + public void fetchCertificateAuthorityCsr( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getFetchCertificateAuthorityCsrMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void getCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetCertificateAuthorityMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void listCertificateAuthorities( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListCertificateAuthoritiesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.
+     * 
+ */ + public void restoreCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRestoreCertificateAuthorityMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.
+     * 
+ */ + public void scheduleDeleteCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getScheduleDeleteCertificateAuthorityMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void updateCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateCertificateAuthorityMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create a new [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in a given Project, Location
+     * for a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public void createCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateCertificateRevocationListMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public void getCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetCertificateRevocationListMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public void listCertificateRevocationLists( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListCertificateRevocationListsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public void updateCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateCertificateRevocationListMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a given Project and Location.
+     * 
+ */ + public void createReusableConfig( + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateReusableConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * DeleteReusableConfig deletes a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public void deleteReusableConfig( + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteReusableConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public void getReusableConfig( + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetReusableConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public void listReusableConfigs( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListReusableConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public void updateReusableConfig( + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateReusableConfigMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private
+   * certificate authorities and issued certificates.
+   * 
+ */ + public static final class CertificateAuthorityServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CertificateAuthorityServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CertificateAuthorityServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateAuthorityServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.Certificate createCertificate( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest request) { + return blockingUnaryCall( + getChannel(), getCreateCertificateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.Certificate getCertificate( + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest request) { + return blockingUnaryCall(getChannel(), getGetCertificateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse listCertificates( + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest request) { + return blockingUnaryCall( + getChannel(), getListCertificatesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.Certificate revokeCertificate( + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest request) { + return blockingUnaryCall( + getChannel(), getRevokeCertificateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.Certificate updateCertificate( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateCertificateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state
+     * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is
+     * of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the
+     * parent Certificate Authority signs a certificate signing request from
+     * [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation
+     * process.
+     * 
+ */ + public com.google.longrunning.Operation activateCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest request) { + return blockingUnaryCall( + getChannel(), getActivateCertificateAuthorityMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.
+     * 
+ */ + public com.google.longrunning.Operation createCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest request) { + return blockingUnaryCall( + getChannel(), getCreateCertificateAuthorityMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.longrunning.Operation disableCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest request) { + return blockingUnaryCall( + getChannel(), getDisableCertificateAuthorityMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.longrunning.Operation enableCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest request) { + return blockingUnaryCall( + getChannel(), getEnableCertificateAuthorityMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * that is in state
+     * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is
+     * of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must
+     * then be signed by the desired parent Certificate Authority, which could be
+     * another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem
+     * certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + fetchCertificateAuthorityCsr( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + request) { + return blockingUnaryCall( + getChannel(), getFetchCertificateAuthorityCsrMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority getCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest request) { + return blockingUnaryCall( + getChannel(), getGetCertificateAuthorityMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + listCertificateAuthorities( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest request) { + return blockingUnaryCall( + getChannel(), getListCertificateAuthoritiesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.
+     * 
+ */ + public com.google.longrunning.Operation restoreCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest request) { + return blockingUnaryCall( + getChannel(), getRestoreCertificateAuthorityMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.
+     * 
+ */ + public com.google.longrunning.Operation scheduleDeleteCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + request) { + return blockingUnaryCall( + getChannel(), getScheduleDeleteCertificateAuthorityMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.longrunning.Operation updateCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateCertificateAuthorityMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a new [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in a given Project, Location
+     * for a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.longrunning.Operation createCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + request) { + return blockingUnaryCall( + getChannel(), getCreateCertificateRevocationListMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + request) { + return blockingUnaryCall( + getChannel(), getGetCertificateRevocationListMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + listCertificateRevocationLists( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + request) { + return blockingUnaryCall( + getChannel(), getListCertificateRevocationListsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public com.google.longrunning.Operation updateCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + request) { + return blockingUnaryCall( + getChannel(), getUpdateCertificateRevocationListMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a given Project and Location.
+     * 
+ */ + public com.google.longrunning.Operation createReusableConfig( + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest request) { + return blockingUnaryCall( + getChannel(), getCreateReusableConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * DeleteReusableConfig deletes a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public com.google.longrunning.Operation deleteReusableConfig( + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteReusableConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfig getReusableConfig( + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest request) { + return blockingUnaryCall( + getChannel(), getGetReusableConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + listReusableConfigs( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest request) { + return blockingUnaryCall( + getChannel(), getListReusableConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public com.google.longrunning.Operation updateReusableConfig( + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateReusableConfigMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private
+   * certificate authorities and issued certificates.
+   * 
+ */ + public static final class CertificateAuthorityServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CertificateAuthorityServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CertificateAuthorityServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateAuthorityServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.Certificate> + createCertificate( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateCertificateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.Certificate> + getCertificate(com.google.cloud.security.privateca.v1beta1.GetCertificateRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetCertificateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse> + listCertificates( + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListCertificatesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.Certificate> + revokeCertificate( + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest request) { + return futureUnaryCall( + getChannel().newCall(getRevokeCertificateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.Certificate> + updateCertificate( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateCertificateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state
+     * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is
+     * of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the
+     * parent Certificate Authority signs a certificate signing request from
+     * [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation
+     * process.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + activateCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + request) { + return futureUnaryCall( + getChannel().newCall(getActivateCertificateAuthorityMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateCertificateAuthorityMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + disableCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + request) { + return futureUnaryCall( + getChannel().newCall(getDisableCertificateAuthorityMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + enableCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest request) { + return futureUnaryCall( + getChannel().newCall(getEnableCertificateAuthorityMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * that is in state
+     * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is
+     * of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must
+     * then be signed by the desired parent Certificate Authority, which could be
+     * another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem
+     * certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse> + fetchCertificateAuthorityCsr( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + request) { + return futureUnaryCall( + getChannel().newCall(getFetchCertificateAuthorityCsrMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority> + getCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetCertificateAuthorityMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse> + listCertificateAuthorities( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListCertificateAuthoritiesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + restoreCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + request) { + return futureUnaryCall( + getChannel().newCall(getRestoreCertificateAuthorityMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + scheduleDeleteCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + request) { + return futureUnaryCall( + getChannel().newCall(getScheduleDeleteCertificateAuthorityMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateCertificateAuthorityMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create a new [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in a given Project, Location
+     * for a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + request) { + return futureUnaryCall( + getChannel().newCall(getCreateCertificateRevocationListMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList> + getCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + request) { + return futureUnaryCall( + getChannel().newCall(getGetCertificateRevocationListMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse> + listCertificateRevocationLists( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + request) { + return futureUnaryCall( + getChannel().newCall(getListCertificateRevocationListsMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + request) { + return futureUnaryCall( + getChannel().newCall(getUpdateCertificateRevocationListMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a given Project and Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createReusableConfig( + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateReusableConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * DeleteReusableConfig deletes a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteReusableConfig( + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteReusableConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.ReusableConfig> + getReusableConfig( + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetReusableConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse> + listReusableConfigs( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListReusableConfigsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateReusableConfig( + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateReusableConfigMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_CERTIFICATE = 0; + private static final int METHODID_GET_CERTIFICATE = 1; + private static final int METHODID_LIST_CERTIFICATES = 2; + private static final int METHODID_REVOKE_CERTIFICATE = 3; + private static final int METHODID_UPDATE_CERTIFICATE = 4; + private static final int METHODID_ACTIVATE_CERTIFICATE_AUTHORITY = 5; + private static final int METHODID_CREATE_CERTIFICATE_AUTHORITY = 6; + private static final int METHODID_DISABLE_CERTIFICATE_AUTHORITY = 7; + private static final int METHODID_ENABLE_CERTIFICATE_AUTHORITY = 8; + private static final int METHODID_FETCH_CERTIFICATE_AUTHORITY_CSR = 9; + private static final int METHODID_GET_CERTIFICATE_AUTHORITY = 10; + private static final int METHODID_LIST_CERTIFICATE_AUTHORITIES = 11; + private static final int METHODID_RESTORE_CERTIFICATE_AUTHORITY = 12; + private static final int METHODID_SCHEDULE_DELETE_CERTIFICATE_AUTHORITY = 13; + private static final int METHODID_UPDATE_CERTIFICATE_AUTHORITY = 14; + private static final int METHODID_CREATE_CERTIFICATE_REVOCATION_LIST = 15; + private static final int METHODID_GET_CERTIFICATE_REVOCATION_LIST = 16; + private static final int METHODID_LIST_CERTIFICATE_REVOCATION_LISTS = 17; + private static final int METHODID_UPDATE_CERTIFICATE_REVOCATION_LIST = 18; + private static final int METHODID_CREATE_REUSABLE_CONFIG = 19; + private static final int METHODID_DELETE_REUSABLE_CONFIG = 20; + private static final int METHODID_GET_REUSABLE_CONFIG = 21; + private static final int METHODID_LIST_REUSABLE_CONFIGS = 22; + private static final int METHODID_UPDATE_REUSABLE_CONFIG = 23; + + 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 CertificateAuthorityServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(CertificateAuthorityServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_CERTIFICATE: + serviceImpl.createCertificate( + (com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_CERTIFICATE: + serviceImpl.getCertificate( + (com.google.cloud.security.privateca.v1beta1.GetCertificateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_CERTIFICATES: + serviceImpl.listCertificates( + (com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse>) + responseObserver); + break; + case METHODID_REVOKE_CERTIFICATE: + serviceImpl.revokeCertificate( + (com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_CERTIFICATE: + serviceImpl.updateCertificate( + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_ACTIVATE_CERTIFICATE_AUTHORITY: + serviceImpl.activateCertificateAuthority( + (com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_CERTIFICATE_AUTHORITY: + serviceImpl.createCertificateAuthority( + (com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DISABLE_CERTIFICATE_AUTHORITY: + serviceImpl.disableCertificateAuthority( + (com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ENABLE_CERTIFICATE_AUTHORITY: + serviceImpl.enableCertificateAuthority( + (com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_FETCH_CERTIFICATE_AUTHORITY_CSR: + serviceImpl.fetchCertificateAuthorityCsr( + (com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1 + .FetchCertificateAuthorityCsrResponse>) + responseObserver); + break; + case METHODID_GET_CERTIFICATE_AUTHORITY: + serviceImpl.getCertificateAuthority( + (com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority>) + responseObserver); + break; + case METHODID_LIST_CERTIFICATE_AUTHORITIES: + serviceImpl.listCertificateAuthorities( + (com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1 + .ListCertificateAuthoritiesResponse>) + responseObserver); + break; + case METHODID_RESTORE_CERTIFICATE_AUTHORITY: + serviceImpl.restoreCertificateAuthority( + (com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SCHEDULE_DELETE_CERTIFICATE_AUTHORITY: + serviceImpl.scheduleDeleteCertificateAuthority( + (com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CERTIFICATE_AUTHORITY: + serviceImpl.updateCertificateAuthority( + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_CERTIFICATE_REVOCATION_LIST: + serviceImpl.createCertificateRevocationList( + (com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CERTIFICATE_REVOCATION_LIST: + serviceImpl.getCertificateRevocationList( + (com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList>) + responseObserver); + break; + case METHODID_LIST_CERTIFICATE_REVOCATION_LISTS: + serviceImpl.listCertificateRevocationLists( + (com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1 + .ListCertificateRevocationListsResponse>) + responseObserver); + break; + case METHODID_UPDATE_CERTIFICATE_REVOCATION_LIST: + serviceImpl.updateCertificateRevocationList( + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_REUSABLE_CONFIG: + serviceImpl.createReusableConfig( + (com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_REUSABLE_CONFIG: + serviceImpl.deleteReusableConfig( + (com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_REUSABLE_CONFIG: + serviceImpl.getReusableConfig( + (com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.ReusableConfig>) + responseObserver); + break; + case METHODID_LIST_REUSABLE_CONFIGS: + serviceImpl.listReusableConfigs( + (com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse>) + responseObserver); + break; + case METHODID_UPDATE_REUSABLE_CONFIG: + serviceImpl.updateReusableConfig( + (com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class CertificateAuthorityServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CertificateAuthorityServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CertificateAuthorityService"); + } + } + + private static final class CertificateAuthorityServiceFileDescriptorSupplier + extends CertificateAuthorityServiceBaseDescriptorSupplier { + CertificateAuthorityServiceFileDescriptorSupplier() {} + } + + private static final class CertificateAuthorityServiceMethodDescriptorSupplier + extends CertificateAuthorityServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + CertificateAuthorityServiceMethodDescriptorSupplier(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 (CertificateAuthorityServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CertificateAuthorityServiceFileDescriptorSupplier()) + .addMethod(getCreateCertificateMethod()) + .addMethod(getGetCertificateMethod()) + .addMethod(getListCertificatesMethod()) + .addMethod(getRevokeCertificateMethod()) + .addMethod(getUpdateCertificateMethod()) + .addMethod(getActivateCertificateAuthorityMethod()) + .addMethod(getCreateCertificateAuthorityMethod()) + .addMethod(getDisableCertificateAuthorityMethod()) + .addMethod(getEnableCertificateAuthorityMethod()) + .addMethod(getFetchCertificateAuthorityCsrMethod()) + .addMethod(getGetCertificateAuthorityMethod()) + .addMethod(getListCertificateAuthoritiesMethod()) + .addMethod(getRestoreCertificateAuthorityMethod()) + .addMethod(getScheduleDeleteCertificateAuthorityMethod()) + .addMethod(getUpdateCertificateAuthorityMethod()) + .addMethod(getCreateCertificateRevocationListMethod()) + .addMethod(getGetCertificateRevocationListMethod()) + .addMethod(getListCertificateRevocationListsMethod()) + .addMethod(getUpdateCertificateRevocationListMethod()) + .addMethod(getCreateReusableConfigMethod()) + .addMethod(getDeleteReusableConfigMethod()) + .addMethod(getGetReusableConfigMethod()) + .addMethod(getListReusableConfigsMethod()) + .addMethod(getUpdateReusableConfigMethod()) + .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..5fe6c3b2 --- /dev/null +++ b/pom.xml @@ -0,0 +1,189 @@ + + + 4.0.0 + com.google.cloud + google-cloud-security-privateca-parent + pom + 0.0.1-SNAPSHOT + Google Certificate Authority Service 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-security-privateca-parent + + + + + + com.google.cloud + google-cloud-security-privateca + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-security-privateca-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-security-privateca-v1beta1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 0.8.6 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-security-privateca + proto-google-cloud-security-privateca-v1beta1 + grpc-google-cloud-security-privateca-v1beta1 + google-cloud-security-privateca-bom + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.1.0 + + + + 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-security-privateca-v1beta1/pom.xml b/proto-google-cloud-security-privateca-v1beta1/pom.xml new file mode 100644 index 00000000..83a20244 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-security-privateca-v1beta1 + 0.0.1-SNAPSHOT + proto-google-cloud-security-privateca-v1beta1 + Proto library for google-cloud-security-privateca + + com.google.cloud + google-cloud-security-privateca-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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ActivateCertificateAuthorityRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ActivateCertificateAuthorityRequest.java new file mode 100644 index 00000000..06351ae1 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ActivateCertificateAuthorityRequest.java @@ -0,0 +1,1448 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest} + */ +public final class ActivateCertificateAuthorityRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest) + ActivateCertificateAuthorityRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ActivateCertificateAuthorityRequest.newBuilder() to construct. + private ActivateCertificateAuthorityRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ActivateCertificateAuthorityRequest() { + name_ = ""; + pemCaCertificate_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ActivateCertificateAuthorityRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ActivateCertificateAuthorityRequest( + 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(); + + pemCaCertificate_ = s; + break; + } + case 26: + { + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder subBuilder = + null; + if (subordinateConfig_ != null) { + subBuilder = subordinateConfig_.toBuilder(); + } + subordinateConfig_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(subordinateConfig_); + subordinateConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ActivateCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ActivateCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEM_CA_CERTIFICATE_FIELD_NUMBER = 2; + private volatile java.lang.Object pemCaCertificate_; + /** + * + * + *
+   * Required. The signed CA certificate issued from
+   * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr].
+   * 
+ * + * string pem_ca_certificate = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pemCaCertificate. + */ + @java.lang.Override + public java.lang.String getPemCaCertificate() { + java.lang.Object ref = pemCaCertificate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCaCertificate_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The signed CA certificate issued from
+   * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr].
+   * 
+ * + * string pem_ca_certificate = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for pemCaCertificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPemCaCertificateBytes() { + java.lang.Object ref = pemCaCertificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCaCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBORDINATE_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.security.privateca.v1beta1.SubordinateConfig subordinateConfig_; + /** + * + * + *
+   * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+   * further issuers until the self-signed CA.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subordinateConfig field is set. + */ + @java.lang.Override + public boolean hasSubordinateConfig() { + return subordinateConfig_ != null; + } + /** + * + * + *
+   * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+   * further issuers until the self-signed CA.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subordinateConfig. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig getSubordinateConfig() { + return subordinateConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.SubordinateConfig.getDefaultInstance() + : subordinateConfig_; + } + /** + * + * + *
+   * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+   * further issuers until the self-signed CA.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder + getSubordinateConfigOrBuilder() { + return getSubordinateConfig(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (!getPemCaCertificateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pemCaCertificate_); + } + if (subordinateConfig_ != null) { + output.writeMessage(3, getSubordinateConfig()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getPemCaCertificateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pemCaCertificate_); + } + if (subordinateConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSubordinateConfig()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest other = + (com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPemCaCertificate().equals(other.getPemCaCertificate())) return false; + if (hasSubordinateConfig() != other.hasSubordinateConfig()) return false; + if (hasSubordinateConfig()) { + if (!getSubordinateConfig().equals(other.getSubordinateConfig())) 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) + PEM_CA_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getPemCaCertificate().hashCode(); + if (hasSubordinateConfig()) { + hash = (37 * hash) + SUBORDINATE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSubordinateConfig().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.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest) + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ActivateCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ActivateCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + pemCaCertificate_ = ""; + + if (subordinateConfigBuilder_ == null) { + subordinateConfig_ = null; + } else { + subordinateConfig_ = null; + subordinateConfigBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ActivateCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest build() { + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest result = + new com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest(this); + result.name_ = name_; + result.pemCaCertificate_ = pemCaCertificate_; + if (subordinateConfigBuilder_ == null) { + result.subordinateConfig_ = subordinateConfig_; + } else { + result.subordinateConfig_ = subordinateConfigBuilder_.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.security.privateca.v1beta1.ActivateCertificateAuthorityRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getPemCaCertificate().isEmpty()) { + pemCaCertificate_ = other.pemCaCertificate_; + onChanged(); + } + if (other.hasSubordinateConfig()) { + mergeSubordinateConfig(other.getSubordinateConfig()); + } + 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.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object pemCaCertificate_ = ""; + /** + * + * + *
+     * Required. The signed CA certificate issued from
+     * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr].
+     * 
+ * + * string pem_ca_certificate = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pemCaCertificate. + */ + public java.lang.String getPemCaCertificate() { + java.lang.Object ref = pemCaCertificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCaCertificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The signed CA certificate issued from
+     * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr].
+     * 
+ * + * string pem_ca_certificate = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for pemCaCertificate. + */ + public com.google.protobuf.ByteString getPemCaCertificateBytes() { + java.lang.Object ref = pemCaCertificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCaCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The signed CA certificate issued from
+     * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr].
+     * 
+ * + * string pem_ca_certificate = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The pemCaCertificate to set. + * @return This builder for chaining. + */ + public Builder setPemCaCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pemCaCertificate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The signed CA certificate issued from
+     * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr].
+     * 
+ * + * string pem_ca_certificate = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPemCaCertificate() { + + pemCaCertificate_ = getDefaultInstance().getPemCaCertificate(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The signed CA certificate issued from
+     * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr].
+     * 
+ * + * string pem_ca_certificate = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for pemCaCertificate to set. + * @return This builder for chaining. + */ + public Builder setPemCaCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pemCaCertificate_ = value; + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.SubordinateConfig subordinateConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubordinateConfig, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder> + subordinateConfigBuilder_; + /** + * + * + *
+     * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+     * further issuers until the self-signed CA.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subordinateConfig field is set. + */ + public boolean hasSubordinateConfig() { + return subordinateConfigBuilder_ != null || subordinateConfig_ != null; + } + /** + * + * + *
+     * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+     * further issuers until the self-signed CA.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subordinateConfig. + */ + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig getSubordinateConfig() { + if (subordinateConfigBuilder_ == null) { + return subordinateConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.SubordinateConfig.getDefaultInstance() + : subordinateConfig_; + } else { + return subordinateConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+     * further issuers until the self-signed CA.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubordinateConfig( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig value) { + if (subordinateConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subordinateConfig_ = value; + onChanged(); + } else { + subordinateConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+     * further issuers until the self-signed CA.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubordinateConfig( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder builderForValue) { + if (subordinateConfigBuilder_ == null) { + subordinateConfig_ = builderForValue.build(); + onChanged(); + } else { + subordinateConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+     * further issuers until the self-signed CA.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSubordinateConfig( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig value) { + if (subordinateConfigBuilder_ == null) { + if (subordinateConfig_ != null) { + subordinateConfig_ = + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.newBuilder( + subordinateConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + subordinateConfig_ = value; + } + onChanged(); + } else { + subordinateConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+     * further issuers until the self-signed CA.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSubordinateConfig() { + if (subordinateConfigBuilder_ == null) { + subordinateConfig_ = null; + onChanged(); + } else { + subordinateConfig_ = null; + subordinateConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+     * further issuers until the self-signed CA.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder + getSubordinateConfigBuilder() { + + onChanged(); + return getSubordinateConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+     * further issuers until the self-signed CA.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder + getSubordinateConfigOrBuilder() { + if (subordinateConfigBuilder_ != null) { + return subordinateConfigBuilder_.getMessageOrBuilder(); + } else { + return subordinateConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.SubordinateConfig.getDefaultInstance() + : subordinateConfig_; + } + } + /** + * + * + *
+     * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+     * further issuers until the self-signed CA.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubordinateConfig, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder> + getSubordinateConfigFieldBuilder() { + if (subordinateConfigBuilder_ == null) { + subordinateConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubordinateConfig, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder>( + getSubordinateConfig(), getParentForChildren(), isClean()); + subordinateConfig_ = null; + } + return subordinateConfigBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest) + private static final com.google.cloud.security.privateca.v1beta1 + .ActivateCertificateAuthorityRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActivateCertificateAuthorityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ActivateCertificateAuthorityRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ActivateCertificateAuthorityRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ActivateCertificateAuthorityRequestOrBuilder.java new file mode 100644 index 00000000..ee7618bf --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ActivateCertificateAuthorityRequestOrBuilder.java @@ -0,0 +1,173 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ActivateCertificateAuthorityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The signed CA certificate issued from
+   * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr].
+   * 
+ * + * string pem_ca_certificate = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pemCaCertificate. + */ + java.lang.String getPemCaCertificate(); + /** + * + * + *
+   * Required. The signed CA certificate issued from
+   * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr].
+   * 
+ * + * string pem_ca_certificate = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for pemCaCertificate. + */ + com.google.protobuf.ByteString getPemCaCertificateBytes(); + + /** + * + * + *
+   * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+   * further issuers until the self-signed CA.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subordinateConfig field is set. + */ + boolean hasSubordinateConfig(); + /** + * + * + *
+   * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+   * further issuers until the self-signed CA.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subordinateConfig. + */ + com.google.cloud.security.privateca.v1beta1.SubordinateConfig getSubordinateConfig(); + /** + * + * + *
+   * Required. Must include information about the issuer of 'pem_ca_certificate', and any
+   * further issuers until the self-signed CA.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder + getSubordinateConfigOrBuilder(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/Certificate.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/Certificate.java new file mode 100644 index 00000000..489ac848 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/Certificate.java @@ -0,0 +1,4614 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] corresponds to a signed X.509 certificate issued by a
+ * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.Certificate} + */ +public final class Certificate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.Certificate) + CertificateOrBuilder { + private static final long serialVersionUID = 0L; + // Use Certificate.newBuilder() to construct. + private Certificate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Certificate() { + name_ = ""; + pemCertificate_ = ""; + pemCertificateChain_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Certificate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Certificate( + 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(); + certificateConfigCase_ = 2; + certificateConfig_ = s; + break; + } + case 26: + { + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder subBuilder = + null; + if (certificateConfigCase_ == 3) { + subBuilder = + ((com.google.cloud.security.privateca.v1beta1.CertificateConfig) + certificateConfig_) + .toBuilder(); + } + certificateConfig_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateConfig) + certificateConfig_); + certificateConfig_ = subBuilder.buildPartial(); + } + certificateConfigCase_ = 3; + break; + } + case 34: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (lifetime_ != null) { + subBuilder = lifetime_.toBuilder(); + } + lifetime_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lifetime_); + lifetime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.Builder + subBuilder = null; + if (revocationDetails_ != null) { + subBuilder = revocationDetails_.toBuilder(); + } + revocationDetails_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(revocationDetails_); + revocationDetails_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + pemCertificate_ = s; + break; + } + case 58: + { + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder + subBuilder = null; + if (certificateDescription_ != null) { + subBuilder = certificateDescription_.toBuilder(); + } + certificateDescription_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificateDescription_); + certificateDescription_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pemCertificateChain_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pemCertificateChain_.add(s); + break; + } + case 74: + { + 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 82: + { + 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 90: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (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)) { + pemCertificateChain_ = pemCertificateChain_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Certificate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Certificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.Certificate.class, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder.class); + } + + public interface RevocationDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_state = 1; + * + * @return The enum numeric value on the wire for revocationState. + */ + int getRevocationStateValue(); + /** + * + * + *
+     * Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_state = 1; + * + * @return The revocationState. + */ + com.google.cloud.security.privateca.v1beta1.RevocationReason getRevocationState(); + + /** + * + * + *
+     * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + * + * @return Whether the revocationTime field is set. + */ + boolean hasRevocationTime(); + /** + * + * + *
+     * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + * + * @return The revocationTime. + */ + com.google.protobuf.Timestamp getRevocationTime(); + /** + * + * + *
+     * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getRevocationTimeOrBuilder(); + } + /** + * + * + *
+   * Describes fields that are relavent to the revocation of a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails} + */ + public static final class RevocationDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails) + RevocationDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use RevocationDetails.newBuilder() to construct. + private RevocationDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RevocationDetails() { + revocationState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RevocationDetails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RevocationDetails( + 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(); + + revocationState_ = rawValue; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (revocationTime_ != null) { + subBuilder = revocationTime_.toBuilder(); + } + revocationTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(revocationTime_); + revocationTime_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Certificate_RevocationDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Certificate_RevocationDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.class, + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.Builder + .class); + } + + public static final int REVOCATION_STATE_FIELD_NUMBER = 1; + private int revocationState_; + /** + * + * + *
+     * Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_state = 1; + * + * @return The enum numeric value on the wire for revocationState. + */ + @java.lang.Override + public int getRevocationStateValue() { + return revocationState_; + } + /** + * + * + *
+     * Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_state = 1; + * + * @return The revocationState. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RevocationReason getRevocationState() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.RevocationReason result = + com.google.cloud.security.privateca.v1beta1.RevocationReason.valueOf(revocationState_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.RevocationReason.UNRECOGNIZED + : result; + } + + public static final int REVOCATION_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp revocationTime_; + /** + * + * + *
+     * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + * + * @return Whether the revocationTime field is set. + */ + @java.lang.Override + public boolean hasRevocationTime() { + return revocationTime_ != null; + } + /** + * + * + *
+     * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + * + * @return The revocationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRevocationTime() { + return revocationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : revocationTime_; + } + /** + * + * + *
+     * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRevocationTimeOrBuilder() { + return getRevocationTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (revocationState_ + != com.google.cloud.security.privateca.v1beta1.RevocationReason + .REVOCATION_REASON_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, revocationState_); + } + if (revocationTime_ != null) { + output.writeMessage(2, getRevocationTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (revocationState_ + != com.google.cloud.security.privateca.v1beta1.RevocationReason + .REVOCATION_REASON_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, revocationState_); + } + if (revocationTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRevocationTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails other = + (com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails) obj; + + if (revocationState_ != other.revocationState_) return false; + if (hasRevocationTime() != other.hasRevocationTime()) return false; + if (hasRevocationTime()) { + if (!getRevocationTime().equals(other.getRevocationTime())) return false; + } + if (!unknownFields.equals(other.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) + REVOCATION_STATE_FIELD_NUMBER; + hash = (53 * hash) + revocationState_; + if (hasRevocationTime()) { + hash = (37 * hash) + REVOCATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRevocationTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Describes fields that are relavent to the revocation of a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails) + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Certificate_RevocationDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Certificate_RevocationDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.class, + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + revocationState_ = 0; + + if (revocationTimeBuilder_ == null) { + revocationTime_ = null; + } else { + revocationTime_ = null; + revocationTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Certificate_RevocationDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails build() { + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + buildPartial() { + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails result = + new com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails(this); + result.revocationState_ = revocationState_; + if (revocationTimeBuilder_ == null) { + result.revocationTime_ = revocationTime_; + } else { + result.revocationTime_ = revocationTimeBuilder_.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.security.privateca.v1beta1.Certificate.RevocationDetails) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails other) { + if (other + == com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + .getDefaultInstance()) return this; + if (other.revocationState_ != 0) { + setRevocationStateValue(other.getRevocationStateValue()); + } + if (other.hasRevocationTime()) { + mergeRevocationTime(other.getRevocationTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int revocationState_ = 0; + /** + * + * + *
+       * Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_state = 1; + * + * + * @return The enum numeric value on the wire for revocationState. + */ + @java.lang.Override + public int getRevocationStateValue() { + return revocationState_; + } + /** + * + * + *
+       * Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_state = 1; + * + * + * @param value The enum numeric value on the wire for revocationState to set. + * @return This builder for chaining. + */ + public Builder setRevocationStateValue(int value) { + + revocationState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_state = 1; + * + * + * @return The revocationState. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RevocationReason getRevocationState() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.RevocationReason result = + com.google.cloud.security.privateca.v1beta1.RevocationReason.valueOf(revocationState_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.RevocationReason.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_state = 1; + * + * + * @param value The revocationState to set. + * @return This builder for chaining. + */ + public Builder setRevocationState( + com.google.cloud.security.privateca.v1beta1.RevocationReason value) { + if (value == null) { + throw new NullPointerException(); + } + + revocationState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_state = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearRevocationState() { + + revocationState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp revocationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + revocationTimeBuilder_; + /** + * + * + *
+       * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + * + * @return Whether the revocationTime field is set. + */ + public boolean hasRevocationTime() { + return revocationTimeBuilder_ != null || revocationTime_ != null; + } + /** + * + * + *
+       * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + * + * @return The revocationTime. + */ + public com.google.protobuf.Timestamp getRevocationTime() { + if (revocationTimeBuilder_ == null) { + return revocationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : revocationTime_; + } else { + return revocationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + */ + public Builder setRevocationTime(com.google.protobuf.Timestamp value) { + if (revocationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revocationTime_ = value; + onChanged(); + } else { + revocationTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + */ + public Builder setRevocationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (revocationTimeBuilder_ == null) { + revocationTime_ = builderForValue.build(); + onChanged(); + } else { + revocationTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + */ + public Builder mergeRevocationTime(com.google.protobuf.Timestamp value) { + if (revocationTimeBuilder_ == null) { + if (revocationTime_ != null) { + revocationTime_ = + com.google.protobuf.Timestamp.newBuilder(revocationTime_) + .mergeFrom(value) + .buildPartial(); + } else { + revocationTime_ = value; + } + onChanged(); + } else { + revocationTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + */ + public Builder clearRevocationTime() { + if (revocationTimeBuilder_ == null) { + revocationTime_ = null; + onChanged(); + } else { + revocationTime_ = null; + revocationTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getRevocationTimeBuilder() { + + onChanged(); + return getRevocationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getRevocationTimeOrBuilder() { + if (revocationTimeBuilder_ != null) { + return revocationTimeBuilder_.getMessageOrBuilder(); + } else { + return revocationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : revocationTime_; + } + } + /** + * + * + *
+       * The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.protobuf.Timestamp revocation_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRevocationTimeFieldBuilder() { + if (revocationTimeBuilder_ == null) { + revocationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRevocationTime(), getParentForChildren(), isClean()); + revocationTime_ = null; + } + return revocationTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails) + private static final com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails(); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RevocationDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RevocationDetails(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int certificateConfigCase_ = 0; + private java.lang.Object certificateConfig_; + + public enum CertificateConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PEM_CSR(2), + CONFIG(3), + CERTIFICATECONFIG_NOT_SET(0); + private final int value; + + private CertificateConfigCase(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 CertificateConfigCase valueOf(int value) { + return forNumber(value); + } + + public static CertificateConfigCase forNumber(int value) { + switch (value) { + case 2: + return PEM_CSR; + case 3: + return CONFIG; + case 0: + return CERTIFICATECONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CertificateConfigCase getCertificateConfigCase() { + return CertificateConfigCase.forNumber(certificateConfigCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+   * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+   * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+   * 
+ * + * 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 PEM_CSR_FIELD_NUMBER = 2; + /** + * + * + *
+   * Immutable. A pem-encoded X.509 certificate signing request (CSR).
+   * 
+ * + * string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The pemCsr. + */ + public java.lang.String getPemCsr() { + java.lang.Object ref = ""; + if (certificateConfigCase_ == 2) { + ref = certificateConfig_; + } + if (ref instanceof java.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 (certificateConfigCase_ == 2) { + certificateConfig_ = s; + } + return s; + } + } + /** + * + * + *
+   * Immutable. A pem-encoded X.509 certificate signing request (CSR).
+   * 
+ * + * string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for pemCsr. + */ + public com.google.protobuf.ByteString getPemCsrBytes() { + java.lang.Object ref = ""; + if (certificateConfigCase_ == 2) { + ref = certificateConfig_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (certificateConfigCase_ == 2) { + certificateConfig_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_FIELD_NUMBER = 3; + /** + * + * + *
+   * Immutable. A description of the certificate and key that does not require X.509 or
+   * ASN.1.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return certificateConfigCase_ == 3; + } + /** + * + * + *
+   * Immutable. A description of the certificate and key that does not require X.509 or
+   * ASN.1.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig getConfig() { + if (certificateConfigCase_ == 3) { + return (com.google.cloud.security.privateca.v1beta1.CertificateConfig) certificateConfig_; + } + return com.google.cloud.security.privateca.v1beta1.CertificateConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Immutable. A description of the certificate and key that does not require X.509 or
+   * ASN.1.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder + getConfigOrBuilder() { + if (certificateConfigCase_ == 3) { + return (com.google.cloud.security.privateca.v1beta1.CertificateConfig) certificateConfig_; + } + return com.google.cloud.security.privateca.v1beta1.CertificateConfig.getDefaultInstance(); + } + + public static final int LIFETIME_FIELD_NUMBER = 4; + private com.google.protobuf.Duration lifetime_; + /** + * + * + *
+   * Required. The desired lifetime of a certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate. Note that the lifetime may be truncated if it would extend
+   * past the life of any certificate authority in the issuing chain.
+   * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the lifetime field is set. + */ + @java.lang.Override + public boolean hasLifetime() { + return lifetime_ != null; + } + /** + * + * + *
+   * Required. The desired lifetime of a certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate. Note that the lifetime may be truncated if it would extend
+   * past the life of any certificate authority in the issuing chain.
+   * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lifetime. + */ + @java.lang.Override + public com.google.protobuf.Duration getLifetime() { + return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_; + } + /** + * + * + *
+   * Required. The desired lifetime of a certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate. Note that the lifetime may be truncated if it would extend
+   * past the life of any certificate authority in the issuing chain.
+   * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getLifetimeOrBuilder() { + return getLifetime(); + } + + public static final int REVOCATION_DETAILS_FIELD_NUMBER = 5; + private com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + revocationDetails_; + /** + * + * + *
+   * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+   * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the revocationDetails field is set. + */ + @java.lang.Override + public boolean hasRevocationDetails() { + return revocationDetails_ != null; + } + /** + * + * + *
+   * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+   * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The revocationDetails. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + getRevocationDetails() { + return revocationDetails_ == null + ? com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + .getDefaultInstance() + : revocationDetails_; + } + /** + * + * + *
+   * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+   * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetailsOrBuilder + getRevocationDetailsOrBuilder() { + return getRevocationDetails(); + } + + public static final int PEM_CERTIFICATE_FIELD_NUMBER = 6; + private volatile java.lang.Object pemCertificate_; + /** + * + * + *
+   * Output only. The pem-encoded, signed X.509 certificate.
+   * 
+ * + * string pem_certificate = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCertificate. + */ + @java.lang.Override + public java.lang.String getPemCertificate() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCertificate_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The pem-encoded, signed X.509 certificate.
+   * 
+ * + * string pem_certificate = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPemCertificateBytes() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERTIFICATE_DESCRIPTION_FIELD_NUMBER = 7; + private com.google.cloud.security.privateca.v1beta1.CertificateDescription + certificateDescription_; + /** + * + * + *
+   * Output only. A structured description of the issued X.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the certificateDescription field is set. + */ + @java.lang.Override + public boolean hasCertificateDescription() { + return certificateDescription_ != null; + } + /** + * + * + *
+   * Output only. A structured description of the issued X.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The certificateDescription. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + getCertificateDescription() { + return certificateDescription_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription.getDefaultInstance() + : certificateDescription_; + } + /** + * + * + *
+   * Output only. A structured description of the issued X.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder + getCertificateDescriptionOrBuilder() { + return getCertificateDescription(); + } + + public static final int PEM_CERTIFICATE_CHAIN_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList pemCertificateChain_; + /** + * + * + *
+   * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+   * in issuer-to-root order according to RFC 5246.
+   * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the pemCertificateChain. + */ + public com.google.protobuf.ProtocolStringList getPemCertificateChainList() { + return pemCertificateChain_; + } + /** + * + * + *
+   * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+   * in issuer-to-root order according to RFC 5246.
+   * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of pemCertificateChain. + */ + public int getPemCertificateChainCount() { + return pemCertificateChain_.size(); + } + /** + * + * + *
+   * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+   * in issuer-to-root order according to RFC 5246.
+   * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The pemCertificateChain at the given index. + */ + public java.lang.String getPemCertificateChain(int index) { + return pemCertificateChain_.get(index); + } + /** + * + * + *
+   * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+   * in issuer-to-root order according to RFC 5246.
+   * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pemCertificateChain at the given index. + */ + public com.google.protobuf.ByteString getPemCertificateChainBytes(int index) { + return pemCertificateChain_.getByteString(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.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 = 10; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LABELS_FIELD_NUMBER = 11; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Certificate_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (certificateConfigCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, certificateConfig_); + } + if (certificateConfigCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.security.privateca.v1beta1.CertificateConfig) certificateConfig_); + } + if (lifetime_ != null) { + output.writeMessage(4, getLifetime()); + } + if (revocationDetails_ != null) { + output.writeMessage(5, getRevocationDetails()); + } + if (!getPemCertificateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pemCertificate_); + } + if (certificateDescription_ != null) { + output.writeMessage(7, getCertificateDescription()); + } + for (int i = 0; i < pemCertificateChain_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, pemCertificateChain_.getRaw(i)); + } + if (createTime_ != null) { + output.writeMessage(9, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(10, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 11); + 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 (certificateConfigCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, certificateConfig_); + } + if (certificateConfigCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.security.privateca.v1beta1.CertificateConfig) certificateConfig_); + } + if (lifetime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getLifetime()); + } + if (revocationDetails_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRevocationDetails()); + } + if (!getPemCertificateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pemCertificate_); + } + if (certificateDescription_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCertificateDescription()); + } + { + int dataSize = 0; + for (int i = 0; i < pemCertificateChain_.size(); i++) { + dataSize += computeStringSizeNoTag(pemCertificateChain_.getRaw(i)); + } + size += dataSize; + size += 1 * getPemCertificateChainList().size(); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, labels__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.Certificate)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.Certificate other = + (com.google.cloud.security.privateca.v1beta1.Certificate) obj; + + if (!getName().equals(other.getName())) return false; + if (hasLifetime() != other.hasLifetime()) return false; + if (hasLifetime()) { + if (!getLifetime().equals(other.getLifetime())) return false; + } + if (hasRevocationDetails() != other.hasRevocationDetails()) return false; + if (hasRevocationDetails()) { + if (!getRevocationDetails().equals(other.getRevocationDetails())) return false; + } + if (!getPemCertificate().equals(other.getPemCertificate())) return false; + if (hasCertificateDescription() != other.hasCertificateDescription()) return false; + if (hasCertificateDescription()) { + if (!getCertificateDescription().equals(other.getCertificateDescription())) return false; + } + if (!getPemCertificateChainList().equals(other.getPemCertificateChainList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getCertificateConfigCase().equals(other.getCertificateConfigCase())) return false; + switch (certificateConfigCase_) { + case 2: + if (!getPemCsr().equals(other.getPemCsr())) return false; + break; + case 3: + if (!getConfig().equals(other.getConfig())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasLifetime()) { + hash = (37 * hash) + LIFETIME_FIELD_NUMBER; + hash = (53 * hash) + getLifetime().hashCode(); + } + if (hasRevocationDetails()) { + hash = (37 * hash) + REVOCATION_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getRevocationDetails().hashCode(); + } + hash = (37 * hash) + PEM_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getPemCertificate().hashCode(); + if (hasCertificateDescription()) { + hash = (37 * hash) + CERTIFICATE_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getCertificateDescription().hashCode(); + } + if (getPemCertificateChainCount() > 0) { + hash = (37 * hash) + PEM_CERTIFICATE_CHAIN_FIELD_NUMBER; + hash = (53 * hash) + getPemCertificateChainList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + switch (certificateConfigCase_) { + case 2: + hash = (37 * hash) + PEM_CSR_FIELD_NUMBER; + hash = (53 * hash) + getPemCsr().hashCode(); + break; + case 3: + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.Certificate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [Certificate][google.cloud.security.privateca.v1beta1.Certificate] corresponds to a signed X.509 certificate issued by a
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.Certificate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.Certificate) + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Certificate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 11: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Certificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.Certificate.class, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.Certificate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (lifetimeBuilder_ == null) { + lifetime_ = null; + } else { + lifetime_ = null; + lifetimeBuilder_ = null; + } + if (revocationDetailsBuilder_ == null) { + revocationDetails_ = null; + } else { + revocationDetails_ = null; + revocationDetailsBuilder_ = null; + } + pemCertificate_ = ""; + + if (certificateDescriptionBuilder_ == null) { + certificateDescription_ = null; + } else { + certificateDescription_ = null; + certificateDescriptionBuilder_ = null; + } + pemCertificateChain_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + certificateConfigCase_ = 0; + certificateConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Certificate_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.Certificate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate build() { + com.google.cloud.security.privateca.v1beta1.Certificate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate buildPartial() { + com.google.cloud.security.privateca.v1beta1.Certificate result = + new com.google.cloud.security.privateca.v1beta1.Certificate(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (certificateConfigCase_ == 2) { + result.certificateConfig_ = certificateConfig_; + } + if (certificateConfigCase_ == 3) { + if (configBuilder_ == null) { + result.certificateConfig_ = certificateConfig_; + } else { + result.certificateConfig_ = configBuilder_.build(); + } + } + if (lifetimeBuilder_ == null) { + result.lifetime_ = lifetime_; + } else { + result.lifetime_ = lifetimeBuilder_.build(); + } + if (revocationDetailsBuilder_ == null) { + result.revocationDetails_ = revocationDetails_; + } else { + result.revocationDetails_ = revocationDetailsBuilder_.build(); + } + result.pemCertificate_ = pemCertificate_; + if (certificateDescriptionBuilder_ == null) { + result.certificateDescription_ = certificateDescription_; + } else { + result.certificateDescription_ = certificateDescriptionBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + pemCertificateChain_ = pemCertificateChain_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pemCertificateChain_ = pemCertificateChain_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.certificateConfigCase_ = certificateConfigCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.Certificate) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.Certificate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.security.privateca.v1beta1.Certificate other) { + if (other == com.google.cloud.security.privateca.v1beta1.Certificate.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasLifetime()) { + mergeLifetime(other.getLifetime()); + } + if (other.hasRevocationDetails()) { + mergeRevocationDetails(other.getRevocationDetails()); + } + if (!other.getPemCertificate().isEmpty()) { + pemCertificate_ = other.pemCertificate_; + onChanged(); + } + if (other.hasCertificateDescription()) { + mergeCertificateDescription(other.getCertificateDescription()); + } + if (!other.pemCertificateChain_.isEmpty()) { + if (pemCertificateChain_.isEmpty()) { + pemCertificateChain_ = other.pemCertificateChain_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePemCertificateChainIsMutable(); + pemCertificateChain_.addAll(other.pemCertificateChain_); + } + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + switch (other.getCertificateConfigCase()) { + case PEM_CSR: + { + certificateConfigCase_ = 2; + certificateConfig_ = other.certificateConfig_; + onChanged(); + break; + } + case CONFIG: + { + mergeConfig(other.getConfig()); + break; + } + case CERTIFICATECONFIG_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.security.privateca.v1beta1.Certificate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.Certificate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int certificateConfigCase_ = 0; + private java.lang.Object certificateConfig_; + + public CertificateConfigCase getCertificateConfigCase() { + return CertificateConfigCase.forNumber(certificateConfigCase_); + } + + public Builder clearCertificateConfig() { + certificateConfigCase_ = 0; + certificateConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+     * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+     * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+     * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+     * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+     * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Immutable. A pem-encoded X.509 certificate signing request (CSR).
+     * 
+ * + * string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The pemCsr. + */ + @java.lang.Override + public java.lang.String getPemCsr() { + java.lang.Object ref = ""; + if (certificateConfigCase_ == 2) { + ref = certificateConfig_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (certificateConfigCase_ == 2) { + certificateConfig_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. A pem-encoded X.509 certificate signing request (CSR).
+     * 
+ * + * string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for pemCsr. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPemCsrBytes() { + java.lang.Object ref = ""; + if (certificateConfigCase_ == 2) { + ref = certificateConfig_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (certificateConfigCase_ == 2) { + certificateConfig_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. A pem-encoded X.509 certificate signing request (CSR).
+     * 
+ * + * string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The pemCsr to set. + * @return This builder for chaining. + */ + public Builder setPemCsr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + certificateConfigCase_ = 2; + certificateConfig_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. A pem-encoded X.509 certificate signing request (CSR).
+     * 
+ * + * string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearPemCsr() { + if (certificateConfigCase_ == 2) { + certificateConfigCase_ = 0; + certificateConfig_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Immutable. A pem-encoded X.509 certificate signing request (CSR).
+     * 
+ * + * string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for pemCsr to set. + * @return This builder for chaining. + */ + public Builder setPemCsrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + certificateConfigCase_ = 2; + certificateConfig_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateConfig, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder> + configBuilder_; + /** + * + * + *
+     * Immutable. A description of the certificate and key that does not require X.509 or
+     * ASN.1.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return certificateConfigCase_ == 3; + } + /** + * + * + *
+     * Immutable. A description of the certificate and key that does not require X.509 or
+     * ASN.1.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig getConfig() { + if (configBuilder_ == null) { + if (certificateConfigCase_ == 3) { + return (com.google.cloud.security.privateca.v1beta1.CertificateConfig) certificateConfig_; + } + return com.google.cloud.security.privateca.v1beta1.CertificateConfig.getDefaultInstance(); + } else { + if (certificateConfigCase_ == 3) { + return configBuilder_.getMessage(); + } + return com.google.cloud.security.privateca.v1beta1.CertificateConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Immutable. A description of the certificate and key that does not require X.509 or
+     * ASN.1.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setConfig(com.google.cloud.security.privateca.v1beta1.CertificateConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateConfig_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + certificateConfigCase_ = 3; + return this; + } + /** + * + * + *
+     * Immutable. A description of the certificate and key that does not require X.509 or
+     * ASN.1.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setConfig( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder builderForValue) { + if (configBuilder_ == null) { + certificateConfig_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + certificateConfigCase_ = 3; + return this; + } + /** + * + * + *
+     * Immutable. A description of the certificate and key that does not require X.509 or
+     * ASN.1.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeConfig( + com.google.cloud.security.privateca.v1beta1.CertificateConfig value) { + if (configBuilder_ == null) { + if (certificateConfigCase_ == 3 + && certificateConfig_ + != com.google.cloud.security.privateca.v1beta1.CertificateConfig + .getDefaultInstance()) { + certificateConfig_ = + com.google.cloud.security.privateca.v1beta1.CertificateConfig.newBuilder( + (com.google.cloud.security.privateca.v1beta1.CertificateConfig) + certificateConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateConfig_ = value; + } + onChanged(); + } else { + if (certificateConfigCase_ == 3) { + configBuilder_.mergeFrom(value); + } + configBuilder_.setMessage(value); + } + certificateConfigCase_ = 3; + return this; + } + /** + * + * + *
+     * Immutable. A description of the certificate and key that does not require X.509 or
+     * ASN.1.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + if (certificateConfigCase_ == 3) { + certificateConfigCase_ = 0; + certificateConfig_ = null; + onChanged(); + } + } else { + if (certificateConfigCase_ == 3) { + certificateConfigCase_ = 0; + certificateConfig_ = null; + } + configBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Immutable. A description of the certificate and key that does not require X.509 or
+     * ASN.1.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder + getConfigBuilder() { + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. A description of the certificate and key that does not require X.509 or
+     * ASN.1.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder + getConfigOrBuilder() { + if ((certificateConfigCase_ == 3) && (configBuilder_ != null)) { + return configBuilder_.getMessageOrBuilder(); + } else { + if (certificateConfigCase_ == 3) { + return (com.google.cloud.security.privateca.v1beta1.CertificateConfig) certificateConfig_; + } + return com.google.cloud.security.privateca.v1beta1.CertificateConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Immutable. A description of the certificate and key that does not require X.509 or
+     * ASN.1.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateConfig, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + if (!(certificateConfigCase_ == 3)) { + certificateConfig_ = + com.google.cloud.security.privateca.v1beta1.CertificateConfig.getDefaultInstance(); + } + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateConfig, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder>( + (com.google.cloud.security.privateca.v1beta1.CertificateConfig) certificateConfig_, + getParentForChildren(), + isClean()); + certificateConfig_ = null; + } + certificateConfigCase_ = 3; + onChanged(); + ; + return configBuilder_; + } + + private com.google.protobuf.Duration lifetime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + lifetimeBuilder_; + /** + * + * + *
+     * Required. The desired lifetime of a certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate. Note that the lifetime may be truncated if it would extend
+     * past the life of any certificate authority in the issuing chain.
+     * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the lifetime field is set. + */ + public boolean hasLifetime() { + return lifetimeBuilder_ != null || lifetime_ != null; + } + /** + * + * + *
+     * Required. The desired lifetime of a certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate. Note that the lifetime may be truncated if it would extend
+     * past the life of any certificate authority in the issuing chain.
+     * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The lifetime. + */ + public com.google.protobuf.Duration getLifetime() { + if (lifetimeBuilder_ == null) { + return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_; + } else { + return lifetimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The desired lifetime of a certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate. Note that the lifetime may be truncated if it would extend
+     * past the life of any certificate authority in the issuing chain.
+     * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLifetime(com.google.protobuf.Duration value) { + if (lifetimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lifetime_ = value; + onChanged(); + } else { + lifetimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired lifetime of a certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate. Note that the lifetime may be truncated if it would extend
+     * past the life of any certificate authority in the issuing chain.
+     * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLifetime(com.google.protobuf.Duration.Builder builderForValue) { + if (lifetimeBuilder_ == null) { + lifetime_ = builderForValue.build(); + onChanged(); + } else { + lifetimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The desired lifetime of a certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate. Note that the lifetime may be truncated if it would extend
+     * past the life of any certificate authority in the issuing chain.
+     * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLifetime(com.google.protobuf.Duration value) { + if (lifetimeBuilder_ == null) { + if (lifetime_ != null) { + lifetime_ = + com.google.protobuf.Duration.newBuilder(lifetime_).mergeFrom(value).buildPartial(); + } else { + lifetime_ = value; + } + onChanged(); + } else { + lifetimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired lifetime of a certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate. Note that the lifetime may be truncated if it would extend
+     * past the life of any certificate authority in the issuing chain.
+     * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLifetime() { + if (lifetimeBuilder_ == null) { + lifetime_ = null; + onChanged(); + } else { + lifetime_ = null; + lifetimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The desired lifetime of a certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate. Note that the lifetime may be truncated if it would extend
+     * past the life of any certificate authority in the issuing chain.
+     * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getLifetimeBuilder() { + + onChanged(); + return getLifetimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The desired lifetime of a certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate. Note that the lifetime may be truncated if it would extend
+     * past the life of any certificate authority in the issuing chain.
+     * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getLifetimeOrBuilder() { + if (lifetimeBuilder_ != null) { + return lifetimeBuilder_.getMessageOrBuilder(); + } else { + return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_; + } + } + /** + * + * + *
+     * Required. The desired lifetime of a certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate. Note that the lifetime may be truncated if it would extend
+     * past the life of any certificate authority in the issuing chain.
+     * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getLifetimeFieldBuilder() { + if (lifetimeBuilder_ == null) { + lifetimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getLifetime(), getParentForChildren(), isClean()); + lifetime_ = null; + } + return lifetimeBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + revocationDetails_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails, + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.Builder, + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetailsOrBuilder> + revocationDetailsBuilder_; + /** + * + * + *
+     * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+     * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the revocationDetails field is set. + */ + public boolean hasRevocationDetails() { + return revocationDetailsBuilder_ != null || revocationDetails_ != null; + } + /** + * + * + *
+     * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+     * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The revocationDetails. + */ + public com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + getRevocationDetails() { + if (revocationDetailsBuilder_ == null) { + return revocationDetails_ == null + ? com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + .getDefaultInstance() + : revocationDetails_; + } else { + return revocationDetailsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+     * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRevocationDetails( + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails value) { + if (revocationDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revocationDetails_ = value; + onChanged(); + } else { + revocationDetailsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+     * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRevocationDetails( + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.Builder + builderForValue) { + if (revocationDetailsBuilder_ == null) { + revocationDetails_ = builderForValue.build(); + onChanged(); + } else { + revocationDetailsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+     * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRevocationDetails( + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails value) { + if (revocationDetailsBuilder_ == null) { + if (revocationDetails_ != null) { + revocationDetails_ = + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.newBuilder( + revocationDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + revocationDetails_ = value; + } + onChanged(); + } else { + revocationDetailsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+     * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRevocationDetails() { + if (revocationDetailsBuilder_ == null) { + revocationDetails_ = null; + onChanged(); + } else { + revocationDetails_ = null; + revocationDetailsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+     * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.Builder + getRevocationDetailsBuilder() { + + onChanged(); + return getRevocationDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+     * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetailsOrBuilder + getRevocationDetailsOrBuilder() { + if (revocationDetailsBuilder_ != null) { + return revocationDetailsBuilder_.getMessageOrBuilder(); + } else { + return revocationDetails_ == null + ? com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + .getDefaultInstance() + : revocationDetails_; + } + } + /** + * + * + *
+     * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+     * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails, + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.Builder, + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetailsOrBuilder> + getRevocationDetailsFieldBuilder() { + if (revocationDetailsBuilder_ == null) { + revocationDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails, + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.Builder, + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetailsOrBuilder>( + getRevocationDetails(), getParentForChildren(), isClean()); + revocationDetails_ = null; + } + return revocationDetailsBuilder_; + } + + private java.lang.Object pemCertificate_ = ""; + /** + * + * + *
+     * Output only. The pem-encoded, signed X.509 certificate.
+     * 
+ * + * string pem_certificate = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCertificate. + */ + public java.lang.String getPemCertificate() { + java.lang.Object ref = pemCertificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCertificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The pem-encoded, signed X.509 certificate.
+     * 
+ * + * string pem_certificate = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + public com.google.protobuf.ByteString getPemCertificateBytes() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The pem-encoded, signed X.509 certificate.
+     * 
+ * + * string pem_certificate = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pemCertificate to set. + * @return This builder for chaining. + */ + public Builder setPemCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pemCertificate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The pem-encoded, signed X.509 certificate.
+     * 
+ * + * string pem_certificate = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPemCertificate() { + + pemCertificate_ = getDefaultInstance().getPemCertificate(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The pem-encoded, signed X.509 certificate.
+     * 
+ * + * string pem_certificate = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pemCertificate to set. + * @return This builder for chaining. + */ + public Builder setPemCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pemCertificate_ = value; + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateDescription + certificateDescription_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder> + certificateDescriptionBuilder_; + /** + * + * + *
+     * Output only. A structured description of the issued X.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the certificateDescription field is set. + */ + public boolean hasCertificateDescription() { + return certificateDescriptionBuilder_ != null || certificateDescription_ != null; + } + /** + * + * + *
+     * Output only. A structured description of the issued X.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The certificateDescription. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + getCertificateDescription() { + if (certificateDescriptionBuilder_ == null) { + return certificateDescription_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription + .getDefaultInstance() + : certificateDescription_; + } else { + return certificateDescriptionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. A structured description of the issued X.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCertificateDescription( + com.google.cloud.security.privateca.v1beta1.CertificateDescription value) { + if (certificateDescriptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateDescription_ = value; + onChanged(); + } else { + certificateDescriptionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. A structured description of the issued X.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCertificateDescription( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder + builderForValue) { + if (certificateDescriptionBuilder_ == null) { + certificateDescription_ = builderForValue.build(); + onChanged(); + } else { + certificateDescriptionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. A structured description of the issued X.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCertificateDescription( + com.google.cloud.security.privateca.v1beta1.CertificateDescription value) { + if (certificateDescriptionBuilder_ == null) { + if (certificateDescription_ != null) { + certificateDescription_ = + com.google.cloud.security.privateca.v1beta1.CertificateDescription.newBuilder( + certificateDescription_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateDescription_ = value; + } + onChanged(); + } else { + certificateDescriptionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. A structured description of the issued X.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCertificateDescription() { + if (certificateDescriptionBuilder_ == null) { + certificateDescription_ = null; + onChanged(); + } else { + certificateDescription_ = null; + certificateDescriptionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. A structured description of the issued X.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder + getCertificateDescriptionBuilder() { + + onChanged(); + return getCertificateDescriptionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. A structured description of the issued X.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder + getCertificateDescriptionOrBuilder() { + if (certificateDescriptionBuilder_ != null) { + return certificateDescriptionBuilder_.getMessageOrBuilder(); + } else { + return certificateDescription_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription + .getDefaultInstance() + : certificateDescription_; + } + } + /** + * + * + *
+     * Output only. A structured description of the issued X.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder> + getCertificateDescriptionFieldBuilder() { + if (certificateDescriptionBuilder_ == null) { + certificateDescriptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder>( + getCertificateDescription(), getParentForChildren(), isClean()); + certificateDescription_ = null; + } + return certificateDescriptionBuilder_; + } + + private com.google.protobuf.LazyStringList pemCertificateChain_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensurePemCertificateChainIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pemCertificateChain_ = new com.google.protobuf.LazyStringArrayList(pemCertificateChain_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+     * in issuer-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the pemCertificateChain. + */ + public com.google.protobuf.ProtocolStringList getPemCertificateChainList() { + return pemCertificateChain_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+     * in issuer-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of pemCertificateChain. + */ + public int getPemCertificateChainCount() { + return pemCertificateChain_.size(); + } + /** + * + * + *
+     * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+     * in issuer-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The pemCertificateChain at the given index. + */ + public java.lang.String getPemCertificateChain(int index) { + return pemCertificateChain_.get(index); + } + /** + * + * + *
+     * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+     * in issuer-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pemCertificateChain at the given index. + */ + public com.google.protobuf.ByteString getPemCertificateChainBytes(int index) { + return pemCertificateChain_.getByteString(index); + } + /** + * + * + *
+     * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+     * in issuer-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The pemCertificateChain to set. + * @return This builder for chaining. + */ + public Builder setPemCertificateChain(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePemCertificateChainIsMutable(); + pemCertificateChain_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+     * in issuer-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The pemCertificateChain to add. + * @return This builder for chaining. + */ + public Builder addPemCertificateChain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePemCertificateChainIsMutable(); + pemCertificateChain_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+     * in issuer-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The pemCertificateChain to add. + * @return This builder for chaining. + */ + public Builder addAllPemCertificateChain(java.lang.Iterable values) { + ensurePemCertificateChainIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pemCertificateChain_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+     * in issuer-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPemCertificateChain() { + pemCertificateChain_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+     * in issuer-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the pemCertificateChain to add. + * @return This builder for chaining. + */ + public Builder addPemCertificateChainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePemCertificateChainIsMutable(); + pemCertificateChain_.add(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 this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.Certificate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.Certificate) + private static final com.google.cloud.security.privateca.v1beta1.Certificate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.Certificate(); + } + + public static com.google.cloud.security.privateca.v1beta1.Certificate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Certificate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Certificate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthority.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthority.java new file mode 100644 index 00000000..ded64e67 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthority.java @@ -0,0 +1,17408 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] represents an individual Certificate Authority.
+ * A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateAuthority} + */ +public final class CertificateAuthority extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority) + CertificateAuthorityOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateAuthority.newBuilder() to construct. + private CertificateAuthority(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateAuthority() { + name_ = ""; + type_ = 0; + tier_ = 0; + state_ = 0; + pemCaCertificates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + caCertificateDescriptions_ = java.util.Collections.emptyList(); + gcsBucket_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateAuthority(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CertificateAuthority( + 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(); + + type_ = rawValue; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + tier_ = rawValue; + break; + } + case 34: + { + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder subBuilder = + null; + if (config_ != null) { + subBuilder = config_.toBuilder(); + } + config_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(config_); + config_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (lifetime_ != null) { + subBuilder = lifetime_.toBuilder(); + } + lifetime_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lifetime_); + lifetime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .Builder + subBuilder = null; + if (keySpec_ != null) { + subBuilder = keySpec_.toBuilder(); + } + keySpec_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .KeyVersionSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(keySpec_); + keySpec_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.Builder + subBuilder = null; + if (certificatePolicy_ != null) { + subBuilder = certificatePolicy_.toBuilder(); + } + certificatePolicy_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificatePolicy_); + certificatePolicy_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + .Builder + subBuilder = null; + if (issuingOptions_ != null) { + subBuilder = issuingOptions_.toBuilder(); + } + issuingOptions_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .IssuingOptions.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(issuingOptions_); + issuingOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pemCaCertificates_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pemCaCertificates_.add(s); + break; + } + case 80: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 98: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + caCertificateDescriptions_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.CertificateDescription>(); + mutable_bitField0_ |= 0x00000002; + } + caCertificateDescriptions_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.parser(), + extensionRegistry)); + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + + gcsBucket_ = s; + break; + } + case 114: + { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.Builder + subBuilder = null; + if (accessUrls_ != null) { + subBuilder = accessUrls_.toBuilder(); + } + accessUrls_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(accessUrls_); + accessUrls_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + 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 130: + { + 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 138: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (deleteTime_ != null) { + subBuilder = deleteTime_.toBuilder(); + } + deleteTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deleteTime_); + deleteTime_ = subBuilder.buildPartial(); + } + + break; + } + case 146: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 154: + { + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder subBuilder = + null; + if (subordinateConfig_ != null) { + subBuilder = subordinateConfig_.toBuilder(); + } + subordinateConfig_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(subordinateConfig_); + subordinateConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pemCaCertificates_ = pemCaCertificates_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + caCertificateDescriptions_ = + java.util.Collections.unmodifiableList(caCertificateDescriptions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 18: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder.class); + } + + /** + * + * + *
+   * The type of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating its issuing chain.
+   * 
+ * + * Protobuf enum {@code google.cloud.security.privateca.v1beta1.CertificateAuthority.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Self-signed CA.
+     * 
+ * + * SELF_SIGNED = 1; + */ + SELF_SIGNED(1), + /** + * + * + *
+     * Subordinate CA. Could be issued by a Private CA [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * or an unmanaged CA.
+     * 
+ * + * SUBORDINATE = 2; + */ + SUBORDINATE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Self-signed CA.
+     * 
+ * + * SELF_SIGNED = 1; + */ + public static final int SELF_SIGNED_VALUE = 1; + /** + * + * + *
+     * Subordinate CA. Could be issued by a Private CA [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * or an unmanaged CA.
+     * 
+ * + * SUBORDINATE = 2; + */ + public static final int SUBORDINATE_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 Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return SELF_SIGNED; + case 2: + return SUBORDINATE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.Type) + } + + /** + * + * + *
+   * The tier of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating its supported
+   * functionality and/or billing SKU.
+   * 
+ * + * Protobuf enum {@code google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier} + */ + public enum Tier implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * TIER_UNSPECIFIED = 0; + */ + TIER_UNSPECIFIED(0), + /** + * + * + *
+     * Enterprise tier.
+     * 
+ * + * ENTERPRISE = 1; + */ + ENTERPRISE(1), + /** + * + * + *
+     * DevOps tier.
+     * 
+ * + * DEVOPS = 2; + */ + DEVOPS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * TIER_UNSPECIFIED = 0; + */ + public static final int TIER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Enterprise tier.
+     * 
+ * + * ENTERPRISE = 1; + */ + public static final int ENTERPRISE_VALUE = 1; + /** + * + * + *
+     * DevOps tier.
+     * 
+ * + * DEVOPS = 2; + */ + public static final int DEVOPS_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 Tier 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 Tier forNumber(int value) { + switch (value) { + case 0: + return TIER_UNSPECIFIED; + case 1: + return ENTERPRISE; + case 2: + return DEVOPS; + 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 Tier findValueByNumber(int number) { + return Tier.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.security.privateca.v1beta1.CertificateAuthority.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Tier[] VALUES = values(); + + public static Tier 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 Tier(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier) + } + + /** + * + * + *
+   * The state of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating if it can be used.
+   * 
+ * + * Protobuf enum {@code google.cloud.security.privateca.v1beta1.CertificateAuthority.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Certificates can be issued from this CA. CRLs will be generated for this
+     * CA.
+     * 
+ * + * ENABLED = 1; + */ + ENABLED(1), + /** + * + * + *
+     * Certificates cannot be issued from this CA. CRLs will still be generated.
+     * 
+ * + * DISABLED = 2; + */ + DISABLED(2), + /** + * + * + *
+     * Certificates cannot be issued from this CA. CRLs will not be generated.
+     * 
+ * + * PENDING_ACTIVATION = 3; + */ + PENDING_ACTIVATION(3), + /** + * + * + *
+     * Certificates cannot be issued from this CA. CRLs will not be generated.
+     * 
+ * + * PENDING_DELETION = 4; + */ + PENDING_DELETION(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Certificates can be issued from this CA. CRLs will be generated for this
+     * CA.
+     * 
+ * + * ENABLED = 1; + */ + public static final int ENABLED_VALUE = 1; + /** + * + * + *
+     * Certificates cannot be issued from this CA. CRLs will still be generated.
+     * 
+ * + * DISABLED = 2; + */ + public static final int DISABLED_VALUE = 2; + /** + * + * + *
+     * Certificates cannot be issued from this CA. CRLs will not be generated.
+     * 
+ * + * PENDING_ACTIVATION = 3; + */ + public static final int PENDING_ACTIVATION_VALUE = 3; + /** + * + * + *
+     * Certificates cannot be issued from this CA. CRLs will not be generated.
+     * 
+ * + * PENDING_DELETION = 4; + */ + public static final int PENDING_DELETION_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ENABLED; + case 2: + return DISABLED; + case 3: + return PENDING_ACTIVATION; + case 4: + return PENDING_DELETION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.State) + } + + /** + * + * + *
+   * The algorithm of a Cloud KMS CryptoKeyVersion of a
+   * [CryptoKey][google.cloud.kms.v1.CryptoKey] with the
+   * [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value
+   * `ASYMMETRIC_SIGN`. These values correspond to the
+   * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKey.CryptoKeyVersion.CryptoKeyVersionAlgorithm].
+   * values.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm} + */ + public enum SignHashAlgorithm implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * SIGN_HASH_ALGORITHM_UNSPECIFIED = 0; + */ + SIGN_HASH_ALGORITHM_UNSPECIFIED(0), + /** + * + * + *
+     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256
+     * 
+ * + * RSA_PSS_2048_SHA_256 = 1; + */ + RSA_PSS_2048_SHA_256(1), + /** + * + * + *
+     * maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256
+     * 
+ * + * RSA_PSS_3072_SHA_256 = 2; + */ + RSA_PSS_3072_SHA_256(2), + /** + * + * + *
+     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256
+     * 
+ * + * RSA_PSS_4096_SHA_256 = 3; + */ + RSA_PSS_4096_SHA_256(3), + /** + * + * + *
+     * maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256
+     * 
+ * + * EC_P256_SHA256 = 4; + */ + EC_P256_SHA256(4), + /** + * + * + *
+     * maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384
+     * 
+ * + * EC_P384_SHA384 = 5; + */ + EC_P384_SHA384(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * SIGN_HASH_ALGORITHM_UNSPECIFIED = 0; + */ + public static final int SIGN_HASH_ALGORITHM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256
+     * 
+ * + * RSA_PSS_2048_SHA_256 = 1; + */ + public static final int RSA_PSS_2048_SHA_256_VALUE = 1; + /** + * + * + *
+     * maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256
+     * 
+ * + * RSA_PSS_3072_SHA_256 = 2; + */ + public static final int RSA_PSS_3072_SHA_256_VALUE = 2; + /** + * + * + *
+     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256
+     * 
+ * + * RSA_PSS_4096_SHA_256 = 3; + */ + public static final int RSA_PSS_4096_SHA_256_VALUE = 3; + /** + * + * + *
+     * maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256
+     * 
+ * + * EC_P256_SHA256 = 4; + */ + public static final int EC_P256_SHA256_VALUE = 4; + /** + * + * + *
+     * maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384
+     * 
+ * + * EC_P384_SHA384 = 5; + */ + public static final int EC_P384_SHA384_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 SignHashAlgorithm 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 SignHashAlgorithm forNumber(int value) { + switch (value) { + case 0: + return SIGN_HASH_ALGORITHM_UNSPECIFIED; + case 1: + return RSA_PSS_2048_SHA_256; + case 2: + return RSA_PSS_3072_SHA_256; + case 3: + return RSA_PSS_4096_SHA_256; + case 4: + return EC_P256_SHA256; + case 5: + return EC_P384_SHA384; + 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 SignHashAlgorithm findValueByNumber(int number) { + return SignHashAlgorithm.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.security.privateca.v1beta1.CertificateAuthority.getDescriptor() + .getEnumTypes() + .get(3); + } + + private static final SignHashAlgorithm[] VALUES = values(); + + public static SignHashAlgorithm 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 SignHashAlgorithm(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm) + } + + public interface IssuingOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. When true, includes a URL to the issuing CA certificate in the
+     * "authority information access" X.509 extension.
+     * 
+ * + * bool include_ca_cert_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The includeCaCertUrl. + */ + boolean getIncludeCaCertUrl(); + + /** + * + * + *
+     * Required. When true, includes a URL to the CRL corresponding to certificates
+     * issued from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * CRLs will expire 7 days from their creation. However, we will rebuild
+     * daily. CRLs are also rebuilt shortly after a certificate is revoked.
+     * 
+ * + * bool include_crl_access_url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The includeCrlAccessUrl. + */ + boolean getIncludeCrlAccessUrl(); + } + /** + * + * + *
+   * Options that affect all certificates issued by a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} + */ + public static final class IssuingOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) + IssuingOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use IssuingOptions.newBuilder() to construct. + private IssuingOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IssuingOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IssuingOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IssuingOptions( + 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: + { + includeCaCertUrl_ = input.readBool(); + break; + } + case 16: + { + includeCrlAccessUrl_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_IssuingOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_IssuingOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + .Builder.class); + } + + public static final int INCLUDE_CA_CERT_URL_FIELD_NUMBER = 1; + private boolean includeCaCertUrl_; + /** + * + * + *
+     * Required. When true, includes a URL to the issuing CA certificate in the
+     * "authority information access" X.509 extension.
+     * 
+ * + * bool include_ca_cert_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The includeCaCertUrl. + */ + @java.lang.Override + public boolean getIncludeCaCertUrl() { + return includeCaCertUrl_; + } + + public static final int INCLUDE_CRL_ACCESS_URL_FIELD_NUMBER = 2; + private boolean includeCrlAccessUrl_; + /** + * + * + *
+     * Required. When true, includes a URL to the CRL corresponding to certificates
+     * issued from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * CRLs will expire 7 days from their creation. However, we will rebuild
+     * daily. CRLs are also rebuilt shortly after a certificate is revoked.
+     * 
+ * + * bool include_crl_access_url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The includeCrlAccessUrl. + */ + @java.lang.Override + public boolean getIncludeCrlAccessUrl() { + return includeCrlAccessUrl_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (includeCaCertUrl_ != false) { + output.writeBool(1, includeCaCertUrl_); + } + if (includeCrlAccessUrl_ != false) { + output.writeBool(2, includeCrlAccessUrl_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (includeCaCertUrl_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, includeCaCertUrl_); + } + if (includeCrlAccessUrl_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeCrlAccessUrl_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions other = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) obj; + + if (getIncludeCaCertUrl() != other.getIncludeCaCertUrl()) return false; + if (getIncludeCrlAccessUrl() != other.getIncludeCrlAccessUrl()) return false; + if (!unknownFields.equals(other.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) + INCLUDE_CA_CERT_URL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeCaCertUrl()); + hash = (37 * hash) + INCLUDE_CRL_ACCESS_URL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeCrlAccessUrl()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Options that affect all certificates issued by a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_IssuingOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_IssuingOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + .class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + includeCaCertUrl_ = false; + + includeCrlAccessUrl_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_IssuingOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + build() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions result = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions( + this); + result.includeCaCertUrl_ = includeCaCertUrl_; + result.includeCrlAccessUrl_ = includeCrlAccessUrl_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + .getDefaultInstance()) return this; + if (other.getIncludeCaCertUrl() != false) { + setIncludeCaCertUrl(other.getIncludeCaCertUrl()); + } + if (other.getIncludeCrlAccessUrl() != false) { + setIncludeCrlAccessUrl(other.getIncludeCrlAccessUrl()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean includeCaCertUrl_; + /** + * + * + *
+       * Required. When true, includes a URL to the issuing CA certificate in the
+       * "authority information access" X.509 extension.
+       * 
+ * + * bool include_ca_cert_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The includeCaCertUrl. + */ + @java.lang.Override + public boolean getIncludeCaCertUrl() { + return includeCaCertUrl_; + } + /** + * + * + *
+       * Required. When true, includes a URL to the issuing CA certificate in the
+       * "authority information access" X.509 extension.
+       * 
+ * + * bool include_ca_cert_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The includeCaCertUrl to set. + * @return This builder for chaining. + */ + public Builder setIncludeCaCertUrl(boolean value) { + + includeCaCertUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. When true, includes a URL to the issuing CA certificate in the
+       * "authority information access" X.509 extension.
+       * 
+ * + * bool include_ca_cert_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearIncludeCaCertUrl() { + + includeCaCertUrl_ = false; + onChanged(); + return this; + } + + private boolean includeCrlAccessUrl_; + /** + * + * + *
+       * Required. When true, includes a URL to the CRL corresponding to certificates
+       * issued from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+       * CRLs will expire 7 days from their creation. However, we will rebuild
+       * daily. CRLs are also rebuilt shortly after a certificate is revoked.
+       * 
+ * + * bool include_crl_access_url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The includeCrlAccessUrl. + */ + @java.lang.Override + public boolean getIncludeCrlAccessUrl() { + return includeCrlAccessUrl_; + } + /** + * + * + *
+       * Required. When true, includes a URL to the CRL corresponding to certificates
+       * issued from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+       * CRLs will expire 7 days from their creation. However, we will rebuild
+       * daily. CRLs are also rebuilt shortly after a certificate is revoked.
+       * 
+ * + * bool include_crl_access_url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The includeCrlAccessUrl to set. + * @return This builder for chaining. + */ + public Builder setIncludeCrlAccessUrl(boolean value) { + + includeCrlAccessUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. When true, includes a URL to the CRL corresponding to certificates
+       * issued from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+       * CRLs will expire 7 days from their creation. However, we will rebuild
+       * daily. CRLs are also rebuilt shortly after a certificate is revoked.
+       * 
+ * + * bool include_crl_access_url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearIncludeCrlAccessUrl() { + + includeCrlAccessUrl_ = 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.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) + private static final com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .IssuingOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IssuingOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IssuingOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CertificateAuthorityPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allowedConfigList field is set. + */ + boolean hasAllowedConfigList(); + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowedConfigList. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + .AllowedConfigList + getAllowedConfigList(); + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + .AllowedConfigListOrBuilder + getAllowedConfigListOrBuilder(); + + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * will use the provided configuration values, overwriting any requested
+     * configuration values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the overwriteConfigValues field is set. + */ + boolean hasOverwriteConfigValues(); + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * will use the provided configuration values, overwriting any requested
+     * configuration values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The overwriteConfigValues. + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper getOverwriteConfigValues(); + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * will use the provided configuration values, overwriting any requested
+     * configuration values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder + getOverwriteConfigValuesOrBuilder(); + + /** + * + * + *
+     * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+     * field, any value will be allowed for that field.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAllowedLocationsAndOrganizationsList(); + /** + * + * + *
+     * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+     * field, any value will be allowed for that field.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.Subject getAllowedLocationsAndOrganizations( + int index); + /** + * + * + *
+     * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+     * field, any value will be allowed for that field.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAllowedLocationsAndOrganizationsCount(); + /** + * + * + *
+     * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+     * field, any value will be allowed for that field.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAllowedLocationsAndOrganizationsOrBuilderList(); + /** + * + * + *
+     * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+     * field, any value will be allowed for that field.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder + getAllowedLocationsAndOrganizationsOrBuilder(int index); + + /** + * + * + *
+     * Optional. If any value is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed value. If no value is specified, all values
+     * will be allowed for this fied. Glob patterns are also supported.
+     * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedCommonNames. + */ + java.util.List getAllowedCommonNamesList(); + /** + * + * + *
+     * Optional. If any value is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed value. If no value is specified, all values
+     * will be allowed for this fied. Glob patterns are also supported.
+     * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedCommonNames. + */ + int getAllowedCommonNamesCount(); + /** + * + * + *
+     * Optional. If any value is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed value. If no value is specified, all values
+     * will be allowed for this fied. Glob patterns are also supported.
+     * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedCommonNames at the given index. + */ + java.lang.String getAllowedCommonNames(int index); + /** + * + * + *
+     * Optional. If any value is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed value. If no value is specified, all values
+     * will be allowed for this fied. Glob patterns are also supported.
+     * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedCommonNames at the given index. + */ + com.google.protobuf.ByteString getAllowedCommonNamesBytes(int index); + + /** + * + * + *
+     * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+     * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+     * field.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allowedSans field is set. + */ + boolean hasAllowedSans(); + /** + * + * + *
+     * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+     * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+     * field.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowedSans. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + .AllowedSubjectAltNames + getAllowedSans(); + /** + * + * + *
+     * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+     * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+     * field.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + .AllowedSubjectAltNamesOrBuilder + getAllowedSansOrBuilder(); + + /** + * + * + *
+     * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+     * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+     * requested maximum_lifetime, the effective lifetime will be explicitly
+     * truncated.
+     * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the maximumLifetime field is set. + */ + boolean hasMaximumLifetime(); + /** + * + * + *
+     * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+     * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+     * requested maximum_lifetime, the effective lifetime will be explicitly
+     * truncated.
+     * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maximumLifetime. + */ + com.google.protobuf.Duration getMaximumLifetime(); + /** + * + * + *
+     * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+     * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+     * requested maximum_lifetime, the effective lifetime will be explicitly
+     * truncated.
+     * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getMaximumLifetimeOrBuilder(); + + /** + * + * + *
+     * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+     * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allowedIssuanceModes field is set. + */ + boolean hasAllowedIssuanceModes(); + /** + * + * + *
+     * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+     * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowedIssuanceModes. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + .IssuanceModes + getAllowedIssuanceModes(); + /** + * + * + *
+     * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+     * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + .IssuanceModesOrBuilder + getAllowedIssuanceModesOrBuilder(); + + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.ConfigPolicyCase + getConfigPolicyCase(); + } + /** + * + * + *
+   * The issuing policy for a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] will not be successfully issued from this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] if they violate the policy.
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy} + */ + public static final class CertificateAuthorityPolicy + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy) + CertificateAuthorityPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateAuthorityPolicy.newBuilder() to construct. + private CertificateAuthorityPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateAuthorityPolicy() { + allowedLocationsAndOrganizations_ = java.util.Collections.emptyList(); + allowedCommonNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateAuthorityPolicy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CertificateAuthorityPolicy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.Builder + subBuilder = null; + if (configPolicyCase_ == 1) { + subBuilder = + ((com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + configPolicy_) + .toBuilder(); + } + configPolicy_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + configPolicy_); + configPolicy_ = subBuilder.buildPartial(); + } + configPolicyCase_ = 1; + break; + } + case 18: + { + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder + subBuilder = null; + if (configPolicyCase_ == 2) { + subBuilder = + ((com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + configPolicy_) + .toBuilder(); + } + configPolicy_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + configPolicy_); + configPolicy_ = subBuilder.buildPartial(); + } + configPolicyCase_ = 2; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allowedLocationsAndOrganizations_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.Subject>(); + mutable_bitField0_ |= 0x00000001; + } + allowedLocationsAndOrganizations_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.Subject.parser(), + extensionRegistry)); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + allowedCommonNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + allowedCommonNames_.add(s); + break; + } + case 42: + { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.Builder + subBuilder = null; + if (allowedSans_ != null) { + subBuilder = allowedSans_.toBuilder(); + } + allowedSans_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(allowedSans_); + allowedSans_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (maximumLifetime_ != null) { + subBuilder = maximumLifetime_.toBuilder(); + } + maximumLifetime_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maximumLifetime_); + maximumLifetime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.Builder + subBuilder = null; + if (allowedIssuanceModes_ != null) { + subBuilder = allowedIssuanceModes_.toBuilder(); + } + allowedIssuanceModes_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(allowedIssuanceModes_); + allowedIssuanceModes_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + allowedLocationsAndOrganizations_ = + java.util.Collections.unmodifiableList(allowedLocationsAndOrganizations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + allowedCommonNames_ = allowedCommonNames_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.Builder.class); + } + + public interface AllowedConfigListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+       * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+       * allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getAllowedConfigValuesList(); + /** + * + * + *
+       * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+       * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+       * allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper getAllowedConfigValues( + int index); + /** + * + * + *
+       * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+       * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+       * allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getAllowedConfigValuesCount(); + /** + * + * + *
+       * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+       * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+       * allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder> + getAllowedConfigValuesOrBuilderList(); + /** + * + * + *
+       * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+       * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+       * allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder + getAllowedConfigValuesOrBuilder(int index); + } + /** + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList} + */ + public static final class AllowedConfigList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList) + AllowedConfigListOrBuilder { + private static final long serialVersionUID = 0L; + // Use AllowedConfigList.newBuilder() to construct. + private AllowedConfigList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AllowedConfigList() { + allowedConfigValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AllowedConfigList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AllowedConfigList( + 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)) { + allowedConfigValues_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper>(); + mutable_bitField0_ |= 0x00000001; + } + allowedConfigValues_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + .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)) { + allowedConfigValues_ = java.util.Collections.unmodifiableList(allowedConfigValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedConfigList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedConfigList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.Builder.class); + } + + public static final int ALLOWED_CONFIG_VALUES_FIELD_NUMBER = 1; + private java.util.List + allowedConfigValues_; + /** + * + * + *
+       * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+       * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+       * allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getAllowedConfigValuesList() { + return allowedConfigValues_; + } + /** + * + * + *
+       * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+       * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+       * allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder> + getAllowedConfigValuesOrBuilderList() { + return allowedConfigValues_; + } + /** + * + * + *
+       * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+       * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+       * allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getAllowedConfigValuesCount() { + return allowedConfigValues_.size(); + } + /** + * + * + *
+       * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+       * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+       * allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + getAllowedConfigValues(int index) { + return allowedConfigValues_.get(index); + } + /** + * + * + *
+       * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+       * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+       * allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder + getAllowedConfigValuesOrBuilder(int index) { + return allowedConfigValues_.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 < allowedConfigValues_.size(); i++) { + output.writeMessage(1, allowedConfigValues_.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 < allowedConfigValues_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, allowedConfigValues_.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.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + .AllowedConfigList + other = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + obj; + + if (!getAllowedConfigValuesList().equals(other.getAllowedConfigValuesList())) return false; + if (!unknownFields.equals(other.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 (getAllowedConfigValuesCount() > 0) { + hash = (37 * hash) + ALLOWED_CONFIG_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedConfigValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList) + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedConfigList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedConfigList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAllowedConfigValuesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (allowedConfigValuesBuilder_ == null) { + allowedConfigValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + allowedConfigValuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedConfigList_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + build() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + result = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList(this); + int from_bitField0_ = bitField0_; + if (allowedConfigValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + allowedConfigValues_ = java.util.Collections.unmodifiableList(allowedConfigValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedConfigValues_ = allowedConfigValues_; + } else { + result.allowedConfigValues_ = allowedConfigValuesBuilder_.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.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.getDefaultInstance()) return this; + if (allowedConfigValuesBuilder_ == null) { + if (!other.allowedConfigValues_.isEmpty()) { + if (allowedConfigValues_.isEmpty()) { + allowedConfigValues_ = other.allowedConfigValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedConfigValuesIsMutable(); + allowedConfigValues_.addAll(other.allowedConfigValues_); + } + onChanged(); + } + } else { + if (!other.allowedConfigValues_.isEmpty()) { + if (allowedConfigValuesBuilder_.isEmpty()) { + allowedConfigValuesBuilder_.dispose(); + allowedConfigValuesBuilder_ = null; + allowedConfigValues_ = other.allowedConfigValues_; + bitField0_ = (bitField0_ & ~0x00000001); + allowedConfigValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAllowedConfigValuesFieldBuilder() + : null; + } else { + allowedConfigValuesBuilder_.addAllMessages(other.allowedConfigValues_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + allowedConfigValues_ = java.util.Collections.emptyList(); + + private void ensureAllowedConfigValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedConfigValues_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper>( + allowedConfigValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder> + allowedConfigValuesBuilder_; + + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getAllowedConfigValuesList() { + if (allowedConfigValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(allowedConfigValues_); + } else { + return allowedConfigValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getAllowedConfigValuesCount() { + if (allowedConfigValuesBuilder_ == null) { + return allowedConfigValues_.size(); + } else { + return allowedConfigValuesBuilder_.getCount(); + } + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + getAllowedConfigValues(int index) { + if (allowedConfigValuesBuilder_ == null) { + return allowedConfigValues_.get(index); + } else { + return allowedConfigValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAllowedConfigValues( + int index, com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper value) { + if (allowedConfigValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedConfigValuesIsMutable(); + allowedConfigValues_.set(index, value); + onChanged(); + } else { + allowedConfigValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAllowedConfigValues( + int index, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder + builderForValue) { + if (allowedConfigValuesBuilder_ == null) { + ensureAllowedConfigValuesIsMutable(); + allowedConfigValues_.set(index, builderForValue.build()); + onChanged(); + } else { + allowedConfigValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllowedConfigValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper value) { + if (allowedConfigValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedConfigValuesIsMutable(); + allowedConfigValues_.add(value); + onChanged(); + } else { + allowedConfigValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllowedConfigValues( + int index, com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper value) { + if (allowedConfigValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedConfigValuesIsMutable(); + allowedConfigValues_.add(index, value); + onChanged(); + } else { + allowedConfigValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllowedConfigValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder + builderForValue) { + if (allowedConfigValuesBuilder_ == null) { + ensureAllowedConfigValuesIsMutable(); + allowedConfigValues_.add(builderForValue.build()); + onChanged(); + } else { + allowedConfigValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllowedConfigValues( + int index, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder + builderForValue) { + if (allowedConfigValuesBuilder_ == null) { + ensureAllowedConfigValuesIsMutable(); + allowedConfigValues_.add(index, builderForValue.build()); + onChanged(); + } else { + allowedConfigValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllAllowedConfigValues( + java.lang.Iterable< + ? extends com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper> + values) { + if (allowedConfigValuesBuilder_ == null) { + ensureAllowedConfigValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedConfigValues_); + onChanged(); + } else { + allowedConfigValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAllowedConfigValues() { + if (allowedConfigValuesBuilder_ == null) { + allowedConfigValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + allowedConfigValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeAllowedConfigValues(int index) { + if (allowedConfigValuesBuilder_ == null) { + ensureAllowedConfigValuesIsMutable(); + allowedConfigValues_.remove(index); + onChanged(); + } else { + allowedConfigValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder + getAllowedConfigValuesBuilder(int index) { + return getAllowedConfigValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder + getAllowedConfigValuesOrBuilder(int index) { + if (allowedConfigValuesBuilder_ == null) { + return allowedConfigValues_.get(index); + } else { + return allowedConfigValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder> + getAllowedConfigValuesOrBuilderList() { + if (allowedConfigValuesBuilder_ != null) { + return allowedConfigValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(allowedConfigValues_); + } + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder + addAllowedConfigValuesBuilder() { + return getAllowedConfigValuesFieldBuilder() + .addBuilder( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + .getDefaultInstance()); + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder + addAllowedConfigValuesBuilder(int index) { + return getAllowedConfigValuesFieldBuilder() + .addBuilder( + index, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + .getDefaultInstance()); + } + /** + * + * + *
+         * Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+         * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
+         * [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
+         * allowed for that field.
+         * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper allowed_config_values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder> + getAllowedConfigValuesBuilderList() { + return getAllowedConfigValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder> + getAllowedConfigValuesFieldBuilder() { + if (allowedConfigValuesBuilder_ == null) { + allowedConfigValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder>( + allowedConfigValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + allowedConfigValues_ = null; + } + return allowedConfigValuesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList) + private static final com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllowedConfigList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllowedConfigList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AllowedSubjectAltNamesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+       * supported. To allow an explicit wildcard certificate, escape with
+       * backlash (i.e. "\*").
+       * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+       * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+       * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+       * 'foo.bar.com'.
+       * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedDnsNames. + */ + java.util.List getAllowedDnsNamesList(); + /** + * + * + *
+       * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+       * supported. To allow an explicit wildcard certificate, escape with
+       * backlash (i.e. "\*").
+       * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+       * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+       * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+       * 'foo.bar.com'.
+       * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedDnsNames. + */ + int getAllowedDnsNamesCount(); + /** + * + * + *
+       * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+       * supported. To allow an explicit wildcard certificate, escape with
+       * backlash (i.e. "\*").
+       * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+       * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+       * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+       * 'foo.bar.com'.
+       * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedDnsNames at the given index. + */ + java.lang.String getAllowedDnsNames(int index); + /** + * + * + *
+       * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+       * supported. To allow an explicit wildcard certificate, escape with
+       * backlash (i.e. "\*").
+       * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+       * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+       * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+       * 'foo.bar.com'.
+       * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedDnsNames at the given index. + */ + com.google.protobuf.ByteString getAllowedDnsNamesBytes(int index); + + /** + * + * + *
+       * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+       * match across path seperators (i.e. '/') use the double star glob
+       * pattern (i.e. '**').
+       * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the allowedUris. + */ + java.util.List getAllowedUrisList(); + /** + * + * + *
+       * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+       * match across path seperators (i.e. '/') use the double star glob
+       * pattern (i.e. '**').
+       * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of allowedUris. + */ + int getAllowedUrisCount(); + /** + * + * + *
+       * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+       * match across path seperators (i.e. '/') use the double star glob
+       * pattern (i.e. '**').
+       * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The allowedUris at the given index. + */ + java.lang.String getAllowedUris(int index); + /** + * + * + *
+       * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+       * match across path seperators (i.e. '/') use the double star glob
+       * pattern (i.e. '**').
+       * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the allowedUris at the given index. + */ + com.google.protobuf.ByteString getAllowedUrisBytes(int index); + + /** + * + * + *
+       * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+       * supported.
+       * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedEmailAddresses. + */ + java.util.List getAllowedEmailAddressesList(); + /** + * + * + *
+       * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+       * supported.
+       * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedEmailAddresses. + */ + int getAllowedEmailAddressesCount(); + /** + * + * + *
+       * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+       * supported.
+       * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedEmailAddresses at the given index. + */ + java.lang.String getAllowedEmailAddresses(int index); + /** + * + * + *
+       * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+       * supported.
+       * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedEmailAddresses at the given index. + */ + com.google.protobuf.ByteString getAllowedEmailAddressesBytes(int index); + + /** + * + * + *
+       * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+       * addresses and subnet ranges. Subnet ranges are specified using the
+       * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+       * are supported only for ip address entries (i.e. not for subnet ranges).
+       * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the allowedIps. + */ + java.util.List getAllowedIpsList(); + /** + * + * + *
+       * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+       * addresses and subnet ranges. Subnet ranges are specified using the
+       * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+       * are supported only for ip address entries (i.e. not for subnet ranges).
+       * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of allowedIps. + */ + int getAllowedIpsCount(); + /** + * + * + *
+       * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+       * addresses and subnet ranges. Subnet ranges are specified using the
+       * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+       * are supported only for ip address entries (i.e. not for subnet ranges).
+       * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The allowedIps at the given index. + */ + java.lang.String getAllowedIps(int index); + /** + * + * + *
+       * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+       * addresses and subnet ranges. Subnet ranges are specified using the
+       * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+       * are supported only for ip address entries (i.e. not for subnet ranges).
+       * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the allowedIps at the given index. + */ + com.google.protobuf.ByteString getAllowedIpsBytes(int index); + + /** + * + * + *
+       * Optional. Specifies if glob patterns used for [allowed_dns_names][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowed_dns_names] allows
+       * wildcard certificates.
+       * 
+ * + * bool allow_globbing_dns_wildcards = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowGlobbingDnsWildcards. + */ + boolean getAllowGlobbingDnsWildcards(); + + /** + * + * + *
+       * Optional. Specifies if to allow custom X509Extension values.
+       * 
+ * + * bool allow_custom_sans = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowCustomSans. + */ + boolean getAllowCustomSans(); + } + /** + * + * + *
+     * [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] specifies the allowed values for
+     * [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] when issuing
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames} + */ + public static final class AllowedSubjectAltNames extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames) + AllowedSubjectAltNamesOrBuilder { + private static final long serialVersionUID = 0L; + // Use AllowedSubjectAltNames.newBuilder() to construct. + private AllowedSubjectAltNames(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AllowedSubjectAltNames() { + allowedDnsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + allowedUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + allowedEmailAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + allowedIps_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AllowedSubjectAltNames(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AllowedSubjectAltNames( + 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)) { + allowedDnsNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + allowedDnsNames_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + allowedUris_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + allowedUris_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + allowedEmailAddresses_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + allowedEmailAddresses_.add(s); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + allowedIps_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + allowedIps_.add(s); + break; + } + case 40: + { + allowGlobbingDnsWildcards_ = input.readBool(); + break; + } + case 48: + { + allowCustomSans_ = 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)) { + allowedDnsNames_ = allowedDnsNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + allowedUris_ = allowedUris_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + allowedEmailAddresses_ = allowedEmailAddresses_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + allowedIps_ = allowedIps_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedSubjectAltNames_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedSubjectAltNames_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.Builder.class); + } + + public static final int ALLOWED_DNS_NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList allowedDnsNames_; + /** + * + * + *
+       * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+       * supported. To allow an explicit wildcard certificate, escape with
+       * backlash (i.e. "\*").
+       * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+       * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+       * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+       * 'foo.bar.com'.
+       * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedDnsNames. + */ + public com.google.protobuf.ProtocolStringList getAllowedDnsNamesList() { + return allowedDnsNames_; + } + /** + * + * + *
+       * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+       * supported. To allow an explicit wildcard certificate, escape with
+       * backlash (i.e. "\*").
+       * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+       * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+       * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+       * 'foo.bar.com'.
+       * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedDnsNames. + */ + public int getAllowedDnsNamesCount() { + return allowedDnsNames_.size(); + } + /** + * + * + *
+       * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+       * supported. To allow an explicit wildcard certificate, escape with
+       * backlash (i.e. "\*").
+       * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+       * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+       * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+       * 'foo.bar.com'.
+       * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedDnsNames at the given index. + */ + public java.lang.String getAllowedDnsNames(int index) { + return allowedDnsNames_.get(index); + } + /** + * + * + *
+       * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+       * supported. To allow an explicit wildcard certificate, escape with
+       * backlash (i.e. "\*").
+       * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+       * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+       * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+       * 'foo.bar.com'.
+       * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedDnsNames at the given index. + */ + public com.google.protobuf.ByteString getAllowedDnsNamesBytes(int index) { + return allowedDnsNames_.getByteString(index); + } + + public static final int ALLOWED_URIS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList allowedUris_; + /** + * + * + *
+       * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+       * match across path seperators (i.e. '/') use the double star glob
+       * pattern (i.e. '**').
+       * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the allowedUris. + */ + public com.google.protobuf.ProtocolStringList getAllowedUrisList() { + return allowedUris_; + } + /** + * + * + *
+       * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+       * match across path seperators (i.e. '/') use the double star glob
+       * pattern (i.e. '**').
+       * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of allowedUris. + */ + public int getAllowedUrisCount() { + return allowedUris_.size(); + } + /** + * + * + *
+       * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+       * match across path seperators (i.e. '/') use the double star glob
+       * pattern (i.e. '**').
+       * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The allowedUris at the given index. + */ + public java.lang.String getAllowedUris(int index) { + return allowedUris_.get(index); + } + /** + * + * + *
+       * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+       * match across path seperators (i.e. '/') use the double star glob
+       * pattern (i.e. '**').
+       * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the allowedUris at the given index. + */ + public com.google.protobuf.ByteString getAllowedUrisBytes(int index) { + return allowedUris_.getByteString(index); + } + + public static final int ALLOWED_EMAIL_ADDRESSES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList allowedEmailAddresses_; + /** + * + * + *
+       * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+       * supported.
+       * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedEmailAddresses. + */ + public com.google.protobuf.ProtocolStringList getAllowedEmailAddressesList() { + return allowedEmailAddresses_; + } + /** + * + * + *
+       * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+       * supported.
+       * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedEmailAddresses. + */ + public int getAllowedEmailAddressesCount() { + return allowedEmailAddresses_.size(); + } + /** + * + * + *
+       * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+       * supported.
+       * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedEmailAddresses at the given index. + */ + public java.lang.String getAllowedEmailAddresses(int index) { + return allowedEmailAddresses_.get(index); + } + /** + * + * + *
+       * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+       * supported.
+       * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedEmailAddresses at the given index. + */ + public com.google.protobuf.ByteString getAllowedEmailAddressesBytes(int index) { + return allowedEmailAddresses_.getByteString(index); + } + + public static final int ALLOWED_IPS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList allowedIps_; + /** + * + * + *
+       * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+       * addresses and subnet ranges. Subnet ranges are specified using the
+       * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+       * are supported only for ip address entries (i.e. not for subnet ranges).
+       * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the allowedIps. + */ + public com.google.protobuf.ProtocolStringList getAllowedIpsList() { + return allowedIps_; + } + /** + * + * + *
+       * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+       * addresses and subnet ranges. Subnet ranges are specified using the
+       * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+       * are supported only for ip address entries (i.e. not for subnet ranges).
+       * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of allowedIps. + */ + public int getAllowedIpsCount() { + return allowedIps_.size(); + } + /** + * + * + *
+       * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+       * addresses and subnet ranges. Subnet ranges are specified using the
+       * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+       * are supported only for ip address entries (i.e. not for subnet ranges).
+       * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The allowedIps at the given index. + */ + public java.lang.String getAllowedIps(int index) { + return allowedIps_.get(index); + } + /** + * + * + *
+       * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+       * addresses and subnet ranges. Subnet ranges are specified using the
+       * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+       * are supported only for ip address entries (i.e. not for subnet ranges).
+       * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the allowedIps at the given index. + */ + public com.google.protobuf.ByteString getAllowedIpsBytes(int index) { + return allowedIps_.getByteString(index); + } + + public static final int ALLOW_GLOBBING_DNS_WILDCARDS_FIELD_NUMBER = 5; + private boolean allowGlobbingDnsWildcards_; + /** + * + * + *
+       * Optional. Specifies if glob patterns used for [allowed_dns_names][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowed_dns_names] allows
+       * wildcard certificates.
+       * 
+ * + * bool allow_globbing_dns_wildcards = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowGlobbingDnsWildcards. + */ + @java.lang.Override + public boolean getAllowGlobbingDnsWildcards() { + return allowGlobbingDnsWildcards_; + } + + public static final int ALLOW_CUSTOM_SANS_FIELD_NUMBER = 6; + private boolean allowCustomSans_; + /** + * + * + *
+       * Optional. Specifies if to allow custom X509Extension values.
+       * 
+ * + * bool allow_custom_sans = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowCustomSans. + */ + @java.lang.Override + public boolean getAllowCustomSans() { + return allowCustomSans_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 < allowedDnsNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allowedDnsNames_.getRaw(i)); + } + for (int i = 0; i < allowedUris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, allowedUris_.getRaw(i)); + } + for (int i = 0; i < allowedEmailAddresses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, allowedEmailAddresses_.getRaw(i)); + } + for (int i = 0; i < allowedIps_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, allowedIps_.getRaw(i)); + } + if (allowGlobbingDnsWildcards_ != false) { + output.writeBool(5, allowGlobbingDnsWildcards_); + } + if (allowCustomSans_ != false) { + output.writeBool(6, allowCustomSans_); + } + 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 < allowedDnsNames_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedDnsNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedDnsNamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < allowedUris_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedUris_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedUrisList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < allowedEmailAddresses_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedEmailAddresses_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedEmailAddressesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < allowedIps_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedIps_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedIpsList().size(); + } + if (allowGlobbingDnsWildcards_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowGlobbingDnsWildcards_); + } + if (allowCustomSans_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, allowCustomSans_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + .AllowedSubjectAltNames + other = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames) + obj; + + if (!getAllowedDnsNamesList().equals(other.getAllowedDnsNamesList())) return false; + if (!getAllowedUrisList().equals(other.getAllowedUrisList())) return false; + if (!getAllowedEmailAddressesList().equals(other.getAllowedEmailAddressesList())) + return false; + if (!getAllowedIpsList().equals(other.getAllowedIpsList())) return false; + if (getAllowGlobbingDnsWildcards() != other.getAllowGlobbingDnsWildcards()) return false; + if (getAllowCustomSans() != other.getAllowCustomSans()) return false; + if (!unknownFields.equals(other.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 (getAllowedDnsNamesCount() > 0) { + hash = (37 * hash) + ALLOWED_DNS_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedDnsNamesList().hashCode(); + } + if (getAllowedUrisCount() > 0) { + hash = (37 * hash) + ALLOWED_URIS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedUrisList().hashCode(); + } + if (getAllowedEmailAddressesCount() > 0) { + hash = (37 * hash) + ALLOWED_EMAIL_ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedEmailAddressesList().hashCode(); + } + if (getAllowedIpsCount() > 0) { + hash = (37 * hash) + ALLOWED_IPS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedIpsList().hashCode(); + } + hash = (37 * hash) + ALLOW_GLOBBING_DNS_WILDCARDS_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowGlobbingDnsWildcards()); + hash = (37 * hash) + ALLOW_CUSTOM_SANS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowCustomSans()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] specifies the allowed values for
+       * [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] when issuing
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames) + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNamesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedSubjectAltNames_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedSubjectAltNames_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + allowedDnsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + allowedUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + allowedEmailAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + allowedIps_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + allowGlobbingDnsWildcards_ = false; + + allowCustomSans_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedSubjectAltNames_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + build() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + result = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + allowedDnsNames_ = allowedDnsNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedDnsNames_ = allowedDnsNames_; + if (((bitField0_ & 0x00000002) != 0)) { + allowedUris_ = allowedUris_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.allowedUris_ = allowedUris_; + if (((bitField0_ & 0x00000004) != 0)) { + allowedEmailAddresses_ = allowedEmailAddresses_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.allowedEmailAddresses_ = allowedEmailAddresses_; + if (((bitField0_ & 0x00000008) != 0)) { + allowedIps_ = allowedIps_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.allowedIps_ = allowedIps_; + result.allowGlobbingDnsWildcards_ = allowGlobbingDnsWildcards_; + result.allowCustomSans_ = allowCustomSans_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.getDefaultInstance()) + return this; + if (!other.allowedDnsNames_.isEmpty()) { + if (allowedDnsNames_.isEmpty()) { + allowedDnsNames_ = other.allowedDnsNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedDnsNamesIsMutable(); + allowedDnsNames_.addAll(other.allowedDnsNames_); + } + onChanged(); + } + if (!other.allowedUris_.isEmpty()) { + if (allowedUris_.isEmpty()) { + allowedUris_ = other.allowedUris_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAllowedUrisIsMutable(); + allowedUris_.addAll(other.allowedUris_); + } + onChanged(); + } + if (!other.allowedEmailAddresses_.isEmpty()) { + if (allowedEmailAddresses_.isEmpty()) { + allowedEmailAddresses_ = other.allowedEmailAddresses_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAllowedEmailAddressesIsMutable(); + allowedEmailAddresses_.addAll(other.allowedEmailAddresses_); + } + onChanged(); + } + if (!other.allowedIps_.isEmpty()) { + if (allowedIps_.isEmpty()) { + allowedIps_ = other.allowedIps_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAllowedIpsIsMutable(); + allowedIps_.addAll(other.allowedIps_); + } + onChanged(); + } + if (other.getAllowGlobbingDnsWildcards() != false) { + setAllowGlobbingDnsWildcards(other.getAllowGlobbingDnsWildcards()); + } + if (other.getAllowCustomSans() != false) { + setAllowCustomSans(other.getAllowCustomSans()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList allowedDnsNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAllowedDnsNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedDnsNames_ = new com.google.protobuf.LazyStringArrayList(allowedDnsNames_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+         * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+         * supported. To allow an explicit wildcard certificate, escape with
+         * backlash (i.e. "\*").
+         * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+         * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+         * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+         * 'foo.bar.com'.
+         * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedDnsNames. + */ + public com.google.protobuf.ProtocolStringList getAllowedDnsNamesList() { + return allowedDnsNames_.getUnmodifiableView(); + } + /** + * + * + *
+         * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+         * supported. To allow an explicit wildcard certificate, escape with
+         * backlash (i.e. "\*").
+         * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+         * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+         * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+         * 'foo.bar.com'.
+         * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedDnsNames. + */ + public int getAllowedDnsNamesCount() { + return allowedDnsNames_.size(); + } + /** + * + * + *
+         * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+         * supported. To allow an explicit wildcard certificate, escape with
+         * backlash (i.e. "\*").
+         * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+         * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+         * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+         * 'foo.bar.com'.
+         * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedDnsNames at the given index. + */ + public java.lang.String getAllowedDnsNames(int index) { + return allowedDnsNames_.get(index); + } + /** + * + * + *
+         * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+         * supported. To allow an explicit wildcard certificate, escape with
+         * backlash (i.e. "\*").
+         * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+         * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+         * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+         * 'foo.bar.com'.
+         * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedDnsNames at the given index. + */ + public com.google.protobuf.ByteString getAllowedDnsNamesBytes(int index) { + return allowedDnsNames_.getByteString(index); + } + /** + * + * + *
+         * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+         * supported. To allow an explicit wildcard certificate, escape with
+         * backlash (i.e. "\*").
+         * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+         * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+         * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+         * 'foo.bar.com'.
+         * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The allowedDnsNames to set. + * @return This builder for chaining. + */ + public Builder setAllowedDnsNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedDnsNamesIsMutable(); + allowedDnsNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+         * supported. To allow an explicit wildcard certificate, escape with
+         * backlash (i.e. "\*").
+         * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+         * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+         * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+         * 'foo.bar.com'.
+         * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The allowedDnsNames to add. + * @return This builder for chaining. + */ + public Builder addAllowedDnsNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedDnsNamesIsMutable(); + allowedDnsNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+         * supported. To allow an explicit wildcard certificate, escape with
+         * backlash (i.e. "\*").
+         * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+         * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+         * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+         * 'foo.bar.com'.
+         * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The allowedDnsNames to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedDnsNames(java.lang.Iterable values) { + ensureAllowedDnsNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedDnsNames_); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+         * supported. To allow an explicit wildcard certificate, escape with
+         * backlash (i.e. "\*").
+         * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+         * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+         * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+         * 'foo.bar.com'.
+         * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowedDnsNames() { + allowedDnsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid, fully-qualified host names. Glob patterns are also
+         * supported. To allow an explicit wildcard certificate, escape with
+         * backlash (i.e. "\*").
+         * E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not
+         * *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
+         * E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not
+         * 'foo.bar.com'.
+         * 
+ * + * repeated string allowed_dns_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the allowedDnsNames to add. + * @return This builder for chaining. + */ + public Builder addAllowedDnsNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedDnsNamesIsMutable(); + allowedDnsNames_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList allowedUris_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAllowedUrisIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + allowedUris_ = new com.google.protobuf.LazyStringArrayList(allowedUris_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+         * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+         * match across path seperators (i.e. '/') use the double star glob
+         * pattern (i.e. '**').
+         * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the allowedUris. + */ + public com.google.protobuf.ProtocolStringList getAllowedUrisList() { + return allowedUris_.getUnmodifiableView(); + } + /** + * + * + *
+         * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+         * match across path seperators (i.e. '/') use the double star glob
+         * pattern (i.e. '**').
+         * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of allowedUris. + */ + public int getAllowedUrisCount() { + return allowedUris_.size(); + } + /** + * + * + *
+         * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+         * match across path seperators (i.e. '/') use the double star glob
+         * pattern (i.e. '**').
+         * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The allowedUris at the given index. + */ + public java.lang.String getAllowedUris(int index) { + return allowedUris_.get(index); + } + /** + * + * + *
+         * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+         * match across path seperators (i.e. '/') use the double star glob
+         * pattern (i.e. '**').
+         * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the allowedUris at the given index. + */ + public com.google.protobuf.ByteString getAllowedUrisBytes(int index) { + return allowedUris_.getByteString(index); + } + /** + * + * + *
+         * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+         * match across path seperators (i.e. '/') use the double star glob
+         * pattern (i.e. '**').
+         * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The allowedUris to set. + * @return This builder for chaining. + */ + public Builder setAllowedUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedUrisIsMutable(); + allowedUris_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+         * match across path seperators (i.e. '/') use the double star glob
+         * pattern (i.e. '**').
+         * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowedUris to add. + * @return This builder for chaining. + */ + public Builder addAllowedUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedUrisIsMutable(); + allowedUris_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+         * match across path seperators (i.e. '/') use the double star glob
+         * pattern (i.e. '**').
+         * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The allowedUris to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedUris(java.lang.Iterable values) { + ensureAllowedUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedUris_); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+         * match across path seperators (i.e. '/') use the double star glob
+         * pattern (i.e. '**').
+         * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowedUris() { + allowedUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
+         * match across path seperators (i.e. '/') use the double star glob
+         * pattern (i.e. '**').
+         * 
+ * + * repeated string allowed_uris = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the allowedUris to add. + * @return This builder for chaining. + */ + public Builder addAllowedUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedUrisIsMutable(); + allowedUris_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList allowedEmailAddresses_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAllowedEmailAddressesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + allowedEmailAddresses_ = + new com.google.protobuf.LazyStringArrayList(allowedEmailAddresses_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+         * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+         * supported.
+         * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedEmailAddresses. + */ + public com.google.protobuf.ProtocolStringList getAllowedEmailAddressesList() { + return allowedEmailAddresses_.getUnmodifiableView(); + } + /** + * + * + *
+         * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+         * supported.
+         * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedEmailAddresses. + */ + public int getAllowedEmailAddressesCount() { + return allowedEmailAddresses_.size(); + } + /** + * + * + *
+         * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+         * supported.
+         * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedEmailAddresses at the given index. + */ + public java.lang.String getAllowedEmailAddresses(int index) { + return allowedEmailAddresses_.get(index); + } + /** + * + * + *
+         * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+         * supported.
+         * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedEmailAddresses at the given index. + */ + public com.google.protobuf.ByteString getAllowedEmailAddressesBytes(int index) { + return allowedEmailAddresses_.getByteString(index); + } + /** + * + * + *
+         * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+         * supported.
+         * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The allowedEmailAddresses to set. + * @return This builder for chaining. + */ + public Builder setAllowedEmailAddresses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedEmailAddressesIsMutable(); + allowedEmailAddresses_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+         * supported.
+         * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The allowedEmailAddresses to add. + * @return This builder for chaining. + */ + public Builder addAllowedEmailAddresses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedEmailAddressesIsMutable(); + allowedEmailAddresses_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+         * supported.
+         * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The allowedEmailAddresses to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedEmailAddresses(java.lang.Iterable values) { + ensureAllowedEmailAddressesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedEmailAddresses_); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+         * supported.
+         * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowedEmailAddresses() { + allowedEmailAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
+         * supported.
+         * 
+ * + * + * repeated string allowed_email_addresses = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the allowedEmailAddresses to add. + * @return This builder for chaining. + */ + public Builder addAllowedEmailAddressesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedEmailAddressesIsMutable(); + allowedEmailAddresses_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList allowedIps_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAllowedIpsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + allowedIps_ = new com.google.protobuf.LazyStringArrayList(allowedIps_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+         * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+         * addresses and subnet ranges. Subnet ranges are specified using the
+         * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+         * are supported only for ip address entries (i.e. not for subnet ranges).
+         * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the allowedIps. + */ + public com.google.protobuf.ProtocolStringList getAllowedIpsList() { + return allowedIps_.getUnmodifiableView(); + } + /** + * + * + *
+         * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+         * addresses and subnet ranges. Subnet ranges are specified using the
+         * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+         * are supported only for ip address entries (i.e. not for subnet ranges).
+         * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of allowedIps. + */ + public int getAllowedIpsCount() { + return allowedIps_.size(); + } + /** + * + * + *
+         * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+         * addresses and subnet ranges. Subnet ranges are specified using the
+         * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+         * are supported only for ip address entries (i.e. not for subnet ranges).
+         * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The allowedIps at the given index. + */ + public java.lang.String getAllowedIps(int index) { + return allowedIps_.get(index); + } + /** + * + * + *
+         * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+         * addresses and subnet ranges. Subnet ranges are specified using the
+         * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+         * are supported only for ip address entries (i.e. not for subnet ranges).
+         * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the allowedIps at the given index. + */ + public com.google.protobuf.ByteString getAllowedIpsBytes(int index) { + return allowedIps_.getByteString(index); + } + /** + * + * + *
+         * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+         * addresses and subnet ranges. Subnet ranges are specified using the
+         * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+         * are supported only for ip address entries (i.e. not for subnet ranges).
+         * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The allowedIps to set. + * @return This builder for chaining. + */ + public Builder setAllowedIps(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpsIsMutable(); + allowedIps_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+         * addresses and subnet ranges. Subnet ranges are specified using the
+         * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+         * are supported only for ip address entries (i.e. not for subnet ranges).
+         * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowedIps to add. + * @return This builder for chaining. + */ + public Builder addAllowedIps(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpsIsMutable(); + allowedIps_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+         * addresses and subnet ranges. Subnet ranges are specified using the
+         * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+         * are supported only for ip address entries (i.e. not for subnet ranges).
+         * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The allowedIps to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedIps(java.lang.Iterable values) { + ensureAllowedIpsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedIps_); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+         * addresses and subnet ranges. Subnet ranges are specified using the
+         * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+         * are supported only for ip address entries (i.e. not for subnet ranges).
+         * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowedIps() { + allowedIps_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
+         * addresses and subnet ranges. Subnet ranges are specified using the
+         * '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
+         * are supported only for ip address entries (i.e. not for subnet ranges).
+         * 
+ * + * repeated string allowed_ips = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the allowedIps to add. + * @return This builder for chaining. + */ + public Builder addAllowedIpsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedIpsIsMutable(); + allowedIps_.add(value); + onChanged(); + return this; + } + + private boolean allowGlobbingDnsWildcards_; + /** + * + * + *
+         * Optional. Specifies if glob patterns used for [allowed_dns_names][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowed_dns_names] allows
+         * wildcard certificates.
+         * 
+ * + * bool allow_globbing_dns_wildcards = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowGlobbingDnsWildcards. + */ + @java.lang.Override + public boolean getAllowGlobbingDnsWildcards() { + return allowGlobbingDnsWildcards_; + } + /** + * + * + *
+         * Optional. Specifies if glob patterns used for [allowed_dns_names][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowed_dns_names] allows
+         * wildcard certificates.
+         * 
+ * + * bool allow_globbing_dns_wildcards = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The allowGlobbingDnsWildcards to set. + * @return This builder for chaining. + */ + public Builder setAllowGlobbingDnsWildcards(boolean value) { + + allowGlobbingDnsWildcards_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Specifies if glob patterns used for [allowed_dns_names][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowed_dns_names] allows
+         * wildcard certificates.
+         * 
+ * + * bool allow_globbing_dns_wildcards = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowGlobbingDnsWildcards() { + + allowGlobbingDnsWildcards_ = false; + onChanged(); + return this; + } + + private boolean allowCustomSans_; + /** + * + * + *
+         * Optional. Specifies if to allow custom X509Extension values.
+         * 
+ * + * bool allow_custom_sans = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowCustomSans. + */ + @java.lang.Override + public boolean getAllowCustomSans() { + return allowCustomSans_; + } + /** + * + * + *
+         * Optional. Specifies if to allow custom X509Extension values.
+         * 
+ * + * bool allow_custom_sans = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowCustomSans to set. + * @return This builder for chaining. + */ + public Builder setAllowCustomSans(boolean value) { + + allowCustomSans_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Specifies if to allow custom X509Extension values.
+         * 
+ * + * bool allow_custom_sans = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowCustomSans() { + + allowCustomSans_ = 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.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames) + private static final com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllowedSubjectAltNames parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllowedSubjectAltNames(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IssuanceModesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
+       * specifying a CSR.
+       * 
+ * + * bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The allowCsrBasedIssuance. + */ + boolean getAllowCsrBasedIssuance(); + + /** + * + * + *
+       * Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
+       * specifying a [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig].
+       * 
+ * + * bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The allowConfigBasedIssuance. + */ + boolean getAllowConfigBasedIssuance(); + } + /** + * + * + *
+     * [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] specifies the allowed ways in which
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] may be requested from this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes} + */ + public static final class IssuanceModes extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes) + IssuanceModesOrBuilder { + private static final long serialVersionUID = 0L; + // Use IssuanceModes.newBuilder() to construct. + private IssuanceModes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IssuanceModes() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IssuanceModes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IssuanceModes( + 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: + { + allowCsrBasedIssuance_ = input.readBool(); + break; + } + case 16: + { + allowConfigBasedIssuance_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_IssuanceModes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_IssuanceModes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.Builder.class); + } + + public static final int ALLOW_CSR_BASED_ISSUANCE_FIELD_NUMBER = 1; + private boolean allowCsrBasedIssuance_; + /** + * + * + *
+       * Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
+       * specifying a CSR.
+       * 
+ * + * bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The allowCsrBasedIssuance. + */ + @java.lang.Override + public boolean getAllowCsrBasedIssuance() { + return allowCsrBasedIssuance_; + } + + public static final int ALLOW_CONFIG_BASED_ISSUANCE_FIELD_NUMBER = 2; + private boolean allowConfigBasedIssuance_; + /** + * + * + *
+       * Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
+       * specifying a [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig].
+       * 
+ * + * bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The allowConfigBasedIssuance. + */ + @java.lang.Override + public boolean getAllowConfigBasedIssuance() { + return allowConfigBasedIssuance_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (allowCsrBasedIssuance_ != false) { + output.writeBool(1, allowCsrBasedIssuance_); + } + if (allowConfigBasedIssuance_ != false) { + output.writeBool(2, allowConfigBasedIssuance_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (allowCsrBasedIssuance_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, allowCsrBasedIssuance_); + } + if (allowConfigBasedIssuance_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowConfigBasedIssuance_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + .IssuanceModes + other = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes) + obj; + + if (getAllowCsrBasedIssuance() != other.getAllowCsrBasedIssuance()) return false; + if (getAllowConfigBasedIssuance() != other.getAllowConfigBasedIssuance()) return false; + if (!unknownFields.equals(other.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) + ALLOW_CSR_BASED_ISSUANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowCsrBasedIssuance()); + hash = (37 * hash) + ALLOW_CONFIG_BASED_ISSUANCE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowConfigBasedIssuance()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] specifies the allowed ways in which
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] may be requested from this
+       * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+       * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes) + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_IssuanceModes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_IssuanceModes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + allowCsrBasedIssuance_ = false; + + allowConfigBasedIssuance_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_IssuanceModes_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + build() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + result = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes(this); + result.allowCsrBasedIssuance_ = allowCsrBasedIssuance_; + result.allowConfigBasedIssuance_ = allowConfigBasedIssuance_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.getDefaultInstance()) return this; + if (other.getAllowCsrBasedIssuance() != false) { + setAllowCsrBasedIssuance(other.getAllowCsrBasedIssuance()); + } + if (other.getAllowConfigBasedIssuance() != false) { + setAllowConfigBasedIssuance(other.getAllowConfigBasedIssuance()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean allowCsrBasedIssuance_; + /** + * + * + *
+         * Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
+         * specifying a CSR.
+         * 
+ * + * bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The allowCsrBasedIssuance. + */ + @java.lang.Override + public boolean getAllowCsrBasedIssuance() { + return allowCsrBasedIssuance_; + } + /** + * + * + *
+         * Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
+         * specifying a CSR.
+         * 
+ * + * bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The allowCsrBasedIssuance to set. + * @return This builder for chaining. + */ + public Builder setAllowCsrBasedIssuance(boolean value) { + + allowCsrBasedIssuance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
+         * specifying a CSR.
+         * 
+ * + * bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAllowCsrBasedIssuance() { + + allowCsrBasedIssuance_ = false; + onChanged(); + return this; + } + + private boolean allowConfigBasedIssuance_; + /** + * + * + *
+         * Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
+         * specifying a [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig].
+         * 
+ * + * bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The allowConfigBasedIssuance. + */ + @java.lang.Override + public boolean getAllowConfigBasedIssuance() { + return allowConfigBasedIssuance_; + } + /** + * + * + *
+         * Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
+         * specifying a [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig].
+         * 
+ * + * bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The allowConfigBasedIssuance to set. + * @return This builder for chaining. + */ + public Builder setAllowConfigBasedIssuance(boolean value) { + + allowConfigBasedIssuance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
+         * specifying a [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig].
+         * 
+ * + * bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowConfigBasedIssuance() { + + allowConfigBasedIssuance_ = 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.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes) + private static final com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IssuanceModes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IssuanceModes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int configPolicyCase_ = 0; + private java.lang.Object configPolicy_; + + public enum ConfigPolicyCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ALLOWED_CONFIG_LIST(1), + OVERWRITE_CONFIG_VALUES(2), + CONFIGPOLICY_NOT_SET(0); + private final int value; + + private ConfigPolicyCase(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 ConfigPolicyCase valueOf(int value) { + return forNumber(value); + } + + public static ConfigPolicyCase forNumber(int value) { + switch (value) { + case 1: + return ALLOWED_CONFIG_LIST; + case 2: + return OVERWRITE_CONFIG_VALUES; + case 0: + return CONFIGPOLICY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConfigPolicyCase getConfigPolicyCase() { + return ConfigPolicyCase.forNumber(configPolicyCase_); + } + + public static final int ALLOWED_CONFIG_LIST_FIELD_NUMBER = 1; + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allowedConfigList field is set. + */ + @java.lang.Override + public boolean hasAllowedConfigList() { + return configPolicyCase_ == 1; + } + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowedConfigList. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + getAllowedConfigList() { + if (configPolicyCase_ == 1) { + return (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + configPolicy_; + } + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.getDefaultInstance(); + } + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigListOrBuilder + getAllowedConfigListOrBuilder() { + if (configPolicyCase_ == 1) { + return (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + configPolicy_; + } + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.getDefaultInstance(); + } + + public static final int OVERWRITE_CONFIG_VALUES_FIELD_NUMBER = 2; + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * will use the provided configuration values, overwriting any requested
+     * configuration values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the overwriteConfigValues field is set. + */ + @java.lang.Override + public boolean hasOverwriteConfigValues() { + return configPolicyCase_ == 2; + } + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * will use the provided configuration values, overwriting any requested
+     * configuration values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The overwriteConfigValues. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + getOverwriteConfigValues() { + if (configPolicyCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) configPolicy_; + } + return com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.getDefaultInstance(); + } + /** + * + * + *
+     * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * will use the provided configuration values, overwriting any requested
+     * configuration values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder + getOverwriteConfigValuesOrBuilder() { + if (configPolicyCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) configPolicy_; + } + return com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.getDefaultInstance(); + } + + public static final int ALLOWED_LOCATIONS_AND_ORGANIZATIONS_FIELD_NUMBER = 3; + private java.util.List + allowedLocationsAndOrganizations_; + /** + * + * + *
+     * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+     * field, any value will be allowed for that field.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getAllowedLocationsAndOrganizationsList() { + return allowedLocationsAndOrganizations_; + } + /** + * + * + *
+     * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+     * field, any value will be allowed for that field.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getAllowedLocationsAndOrganizationsOrBuilderList() { + return allowedLocationsAndOrganizations_; + } + /** + * + * + *
+     * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+     * field, any value will be allowed for that field.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getAllowedLocationsAndOrganizationsCount() { + return allowedLocationsAndOrganizations_.size(); + } + /** + * + * + *
+     * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+     * field, any value will be allowed for that field.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Subject getAllowedLocationsAndOrganizations( + int index) { + return allowedLocationsAndOrganizations_.get(index); + } + /** + * + * + *
+     * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+     * field, any value will be allowed for that field.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder + getAllowedLocationsAndOrganizationsOrBuilder(int index) { + return allowedLocationsAndOrganizations_.get(index); + } + + public static final int ALLOWED_COMMON_NAMES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList allowedCommonNames_; + /** + * + * + *
+     * Optional. If any value is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed value. If no value is specified, all values
+     * will be allowed for this fied. Glob patterns are also supported.
+     * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedCommonNames. + */ + public com.google.protobuf.ProtocolStringList getAllowedCommonNamesList() { + return allowedCommonNames_; + } + /** + * + * + *
+     * Optional. If any value is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed value. If no value is specified, all values
+     * will be allowed for this fied. Glob patterns are also supported.
+     * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedCommonNames. + */ + public int getAllowedCommonNamesCount() { + return allowedCommonNames_.size(); + } + /** + * + * + *
+     * Optional. If any value is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed value. If no value is specified, all values
+     * will be allowed for this fied. Glob patterns are also supported.
+     * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedCommonNames at the given index. + */ + public java.lang.String getAllowedCommonNames(int index) { + return allowedCommonNames_.get(index); + } + /** + * + * + *
+     * Optional. If any value is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match at least one listed value. If no value is specified, all values
+     * will be allowed for this fied. Glob patterns are also supported.
+     * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedCommonNames at the given index. + */ + public com.google.protobuf.ByteString getAllowedCommonNamesBytes(int index) { + return allowedCommonNames_.getByteString(index); + } + + public static final int ALLOWED_SANS_FIELD_NUMBER = 5; + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + allowedSans_; + /** + * + * + *
+     * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+     * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+     * field.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allowedSans field is set. + */ + @java.lang.Override + public boolean hasAllowedSans() { + return allowedSans_ != null; + } + /** + * + * + *
+     * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+     * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+     * field.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowedSans. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + getAllowedSans() { + return allowedSans_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.getDefaultInstance() + : allowedSans_; + } + /** + * + * + *
+     * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+     * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+     * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+     * field.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNamesOrBuilder + getAllowedSansOrBuilder() { + return getAllowedSans(); + } + + public static final int MAXIMUM_LIFETIME_FIELD_NUMBER = 6; + private com.google.protobuf.Duration maximumLifetime_; + /** + * + * + *
+     * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+     * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+     * requested maximum_lifetime, the effective lifetime will be explicitly
+     * truncated.
+     * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the maximumLifetime field is set. + */ + @java.lang.Override + public boolean hasMaximumLifetime() { + return maximumLifetime_ != null; + } + /** + * + * + *
+     * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+     * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+     * requested maximum_lifetime, the effective lifetime will be explicitly
+     * truncated.
+     * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maximumLifetime. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaximumLifetime() { + return maximumLifetime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumLifetime_; + } + /** + * + * + *
+     * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+     * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+     * requested maximum_lifetime, the effective lifetime will be explicitly
+     * truncated.
+     * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaximumLifetimeOrBuilder() { + return getMaximumLifetime(); + } + + public static final int ALLOWED_ISSUANCE_MODES_FIELD_NUMBER = 8; + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + allowedIssuanceModes_; + /** + * + * + *
+     * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+     * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allowedIssuanceModes field is set. + */ + @java.lang.Override + public boolean hasAllowedIssuanceModes() { + return allowedIssuanceModes_ != null; + } + /** + * + * + *
+     * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+     * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowedIssuanceModes. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + getAllowedIssuanceModes() { + return allowedIssuanceModes_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.getDefaultInstance() + : allowedIssuanceModes_; + } + /** + * + * + *
+     * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+     * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModesOrBuilder + getAllowedIssuanceModesOrBuilder() { + return getAllowedIssuanceModes(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (configPolicyCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + configPolicy_); + } + if (configPolicyCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) configPolicy_); + } + for (int i = 0; i < allowedLocationsAndOrganizations_.size(); i++) { + output.writeMessage(3, allowedLocationsAndOrganizations_.get(i)); + } + for (int i = 0; i < allowedCommonNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 4, allowedCommonNames_.getRaw(i)); + } + if (allowedSans_ != null) { + output.writeMessage(5, getAllowedSans()); + } + if (maximumLifetime_ != null) { + output.writeMessage(6, getMaximumLifetime()); + } + if (allowedIssuanceModes_ != null) { + output.writeMessage(8, getAllowedIssuanceModes()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (configPolicyCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + configPolicy_); + } + if (configPolicyCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) configPolicy_); + } + for (int i = 0; i < allowedLocationsAndOrganizations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, allowedLocationsAndOrganizations_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < allowedCommonNames_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedCommonNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedCommonNamesList().size(); + } + if (allowedSans_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAllowedSans()); + } + if (maximumLifetime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMaximumLifetime()); + } + if (allowedIssuanceModes_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getAllowedIssuanceModes()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + other = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy) + obj; + + if (!getAllowedLocationsAndOrganizationsList() + .equals(other.getAllowedLocationsAndOrganizationsList())) return false; + if (!getAllowedCommonNamesList().equals(other.getAllowedCommonNamesList())) return false; + if (hasAllowedSans() != other.hasAllowedSans()) return false; + if (hasAllowedSans()) { + if (!getAllowedSans().equals(other.getAllowedSans())) return false; + } + if (hasMaximumLifetime() != other.hasMaximumLifetime()) return false; + if (hasMaximumLifetime()) { + if (!getMaximumLifetime().equals(other.getMaximumLifetime())) return false; + } + if (hasAllowedIssuanceModes() != other.hasAllowedIssuanceModes()) return false; + if (hasAllowedIssuanceModes()) { + if (!getAllowedIssuanceModes().equals(other.getAllowedIssuanceModes())) return false; + } + if (!getConfigPolicyCase().equals(other.getConfigPolicyCase())) return false; + switch (configPolicyCase_) { + case 1: + if (!getAllowedConfigList().equals(other.getAllowedConfigList())) return false; + break; + case 2: + if (!getOverwriteConfigValues().equals(other.getOverwriteConfigValues())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAllowedLocationsAndOrganizationsCount() > 0) { + hash = (37 * hash) + ALLOWED_LOCATIONS_AND_ORGANIZATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedLocationsAndOrganizationsList().hashCode(); + } + if (getAllowedCommonNamesCount() > 0) { + hash = (37 * hash) + ALLOWED_COMMON_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedCommonNamesList().hashCode(); + } + if (hasAllowedSans()) { + hash = (37 * hash) + ALLOWED_SANS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedSans().hashCode(); + } + if (hasMaximumLifetime()) { + hash = (37 * hash) + MAXIMUM_LIFETIME_FIELD_NUMBER; + hash = (53 * hash) + getMaximumLifetime().hashCode(); + } + if (hasAllowedIssuanceModes()) { + hash = (37 * hash) + ALLOWED_ISSUANCE_MODES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedIssuanceModes().hashCode(); + } + switch (configPolicyCase_) { + case 1: + hash = (37 * hash) + ALLOWED_CONFIG_LIST_FIELD_NUMBER; + hash = (53 * hash) + getAllowedConfigList().hashCode(); + break; + case 2: + hash = (37 * hash) + OVERWRITE_CONFIG_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getOverwriteConfigValues().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 issuing policy for a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] will not be successfully issued from this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] if they violate the policy.
+     * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy) + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAllowedLocationsAndOrganizationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (allowedLocationsAndOrganizationsBuilder_ == null) { + allowedLocationsAndOrganizations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + allowedLocationsAndOrganizationsBuilder_.clear(); + } + allowedCommonNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (allowedSansBuilder_ == null) { + allowedSans_ = null; + } else { + allowedSans_ = null; + allowedSansBuilder_ = null; + } + if (maximumLifetimeBuilder_ == null) { + maximumLifetime_ = null; + } else { + maximumLifetime_ = null; + maximumLifetimeBuilder_ = null; + } + if (allowedIssuanceModesBuilder_ == null) { + allowedIssuanceModes_ = null; + } else { + allowedIssuanceModes_ = null; + allowedIssuanceModesBuilder_ = null; + } + configPolicyCase_ = 0; + configPolicy_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + build() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + result = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy(this); + int from_bitField0_ = bitField0_; + if (configPolicyCase_ == 1) { + if (allowedConfigListBuilder_ == null) { + result.configPolicy_ = configPolicy_; + } else { + result.configPolicy_ = allowedConfigListBuilder_.build(); + } + } + if (configPolicyCase_ == 2) { + if (overwriteConfigValuesBuilder_ == null) { + result.configPolicy_ = configPolicy_; + } else { + result.configPolicy_ = overwriteConfigValuesBuilder_.build(); + } + } + if (allowedLocationsAndOrganizationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + allowedLocationsAndOrganizations_ = + java.util.Collections.unmodifiableList(allowedLocationsAndOrganizations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedLocationsAndOrganizations_ = allowedLocationsAndOrganizations_; + } else { + result.allowedLocationsAndOrganizations_ = + allowedLocationsAndOrganizationsBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + allowedCommonNames_ = allowedCommonNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.allowedCommonNames_ = allowedCommonNames_; + if (allowedSansBuilder_ == null) { + result.allowedSans_ = allowedSans_; + } else { + result.allowedSans_ = allowedSansBuilder_.build(); + } + if (maximumLifetimeBuilder_ == null) { + result.maximumLifetime_ = maximumLifetime_; + } else { + result.maximumLifetime_ = maximumLifetimeBuilder_.build(); + } + if (allowedIssuanceModesBuilder_ == null) { + result.allowedIssuanceModes_ = allowedIssuanceModes_; + } else { + result.allowedIssuanceModes_ = allowedIssuanceModesBuilder_.build(); + } + result.configPolicyCase_ = configPolicyCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.getDefaultInstance()) return this; + if (allowedLocationsAndOrganizationsBuilder_ == null) { + if (!other.allowedLocationsAndOrganizations_.isEmpty()) { + if (allowedLocationsAndOrganizations_.isEmpty()) { + allowedLocationsAndOrganizations_ = other.allowedLocationsAndOrganizations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedLocationsAndOrganizationsIsMutable(); + allowedLocationsAndOrganizations_.addAll(other.allowedLocationsAndOrganizations_); + } + onChanged(); + } + } else { + if (!other.allowedLocationsAndOrganizations_.isEmpty()) { + if (allowedLocationsAndOrganizationsBuilder_.isEmpty()) { + allowedLocationsAndOrganizationsBuilder_.dispose(); + allowedLocationsAndOrganizationsBuilder_ = null; + allowedLocationsAndOrganizations_ = other.allowedLocationsAndOrganizations_; + bitField0_ = (bitField0_ & ~0x00000001); + allowedLocationsAndOrganizationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAllowedLocationsAndOrganizationsFieldBuilder() + : null; + } else { + allowedLocationsAndOrganizationsBuilder_.addAllMessages( + other.allowedLocationsAndOrganizations_); + } + } + } + if (!other.allowedCommonNames_.isEmpty()) { + if (allowedCommonNames_.isEmpty()) { + allowedCommonNames_ = other.allowedCommonNames_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAllowedCommonNamesIsMutable(); + allowedCommonNames_.addAll(other.allowedCommonNames_); + } + onChanged(); + } + if (other.hasAllowedSans()) { + mergeAllowedSans(other.getAllowedSans()); + } + if (other.hasMaximumLifetime()) { + mergeMaximumLifetime(other.getMaximumLifetime()); + } + if (other.hasAllowedIssuanceModes()) { + mergeAllowedIssuanceModes(other.getAllowedIssuanceModes()); + } + switch (other.getConfigPolicyCase()) { + case ALLOWED_CONFIG_LIST: + { + mergeAllowedConfigList(other.getAllowedConfigList()); + break; + } + case OVERWRITE_CONFIG_VALUES: + { + mergeOverwriteConfigValues(other.getOverwriteConfigValues()); + break; + } + case CONFIGPOLICY_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.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int configPolicyCase_ = 0; + private java.lang.Object configPolicy_; + + public ConfigPolicyCase getConfigPolicyCase() { + return ConfigPolicyCase.forNumber(configPolicyCase_); + } + + public Builder clearConfigPolicy() { + configPolicyCase_ = 0; + configPolicy_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigListOrBuilder> + allowedConfigListBuilder_; + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allowedConfigList field is set. + */ + @java.lang.Override + public boolean hasAllowedConfigList() { + return configPolicyCase_ == 1; + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowedConfigList. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + getAllowedConfigList() { + if (allowedConfigListBuilder_ == null) { + if (configPolicyCase_ == 1) { + return (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + configPolicy_; + } + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.getDefaultInstance(); + } else { + if (configPolicyCase_ == 1) { + return allowedConfigListBuilder_.getMessage(); + } + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.getDefaultInstance(); + } + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAllowedConfigList( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + value) { + if (allowedConfigListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configPolicy_ = value; + onChanged(); + } else { + allowedConfigListBuilder_.setMessage(value); + } + configPolicyCase_ = 1; + return this; + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAllowedConfigList( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.Builder + builderForValue) { + if (allowedConfigListBuilder_ == null) { + configPolicy_ = builderForValue.build(); + onChanged(); + } else { + allowedConfigListBuilder_.setMessage(builderForValue.build()); + } + configPolicyCase_ = 1; + return this; + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAllowedConfigList( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList + value) { + if (allowedConfigListBuilder_ == null) { + if (configPolicyCase_ == 1 + && configPolicy_ + != com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.getDefaultInstance()) { + configPolicy_ = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.newBuilder( + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + configPolicy_) + .mergeFrom(value) + .buildPartial(); + } else { + configPolicy_ = value; + } + onChanged(); + } else { + if (configPolicyCase_ == 1) { + allowedConfigListBuilder_.mergeFrom(value); + } + allowedConfigListBuilder_.setMessage(value); + } + configPolicyCase_ = 1; + return this; + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAllowedConfigList() { + if (allowedConfigListBuilder_ == null) { + if (configPolicyCase_ == 1) { + configPolicyCase_ = 0; + configPolicy_ = null; + onChanged(); + } + } else { + if (configPolicyCase_ == 1) { + configPolicyCase_ = 0; + configPolicy_ = null; + } + allowedConfigListBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.Builder + getAllowedConfigListBuilder() { + return getAllowedConfigListFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigListOrBuilder + getAllowedConfigListOrBuilder() { + if ((configPolicyCase_ == 1) && (allowedConfigListBuilder_ != null)) { + return allowedConfigListBuilder_.getMessageOrBuilder(); + } else { + if (configPolicyCase_ == 1) { + return (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + configPolicy_; + } + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.getDefaultInstance(); + } + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList allowed_config_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigListOrBuilder> + getAllowedConfigListFieldBuilder() { + if (allowedConfigListBuilder_ == null) { + if (!(configPolicyCase_ == 1)) { + configPolicy_ = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.getDefaultInstance(); + } + allowedConfigListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigListOrBuilder>( + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedConfigList) + configPolicy_, + getParentForChildren(), + isClean()); + configPolicy_ = null; + } + configPolicyCase_ = 1; + onChanged(); + ; + return allowedConfigListBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder> + overwriteConfigValuesBuilder_; + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * will use the provided configuration values, overwriting any requested
+       * configuration values.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the overwriteConfigValues field is set. + */ + @java.lang.Override + public boolean hasOverwriteConfigValues() { + return configPolicyCase_ == 2; + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * will use the provided configuration values, overwriting any requested
+       * configuration values.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The overwriteConfigValues. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + getOverwriteConfigValues() { + if (overwriteConfigValuesBuilder_ == null) { + if (configPolicyCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + configPolicy_; + } + return com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + .getDefaultInstance(); + } else { + if (configPolicyCase_ == 2) { + return overwriteConfigValuesBuilder_.getMessage(); + } + return com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * will use the provided configuration values, overwriting any requested
+       * configuration values.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOverwriteConfigValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper value) { + if (overwriteConfigValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configPolicy_ = value; + onChanged(); + } else { + overwriteConfigValuesBuilder_.setMessage(value); + } + configPolicyCase_ = 2; + return this; + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * will use the provided configuration values, overwriting any requested
+       * configuration values.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOverwriteConfigValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder + builderForValue) { + if (overwriteConfigValuesBuilder_ == null) { + configPolicy_ = builderForValue.build(); + onChanged(); + } else { + overwriteConfigValuesBuilder_.setMessage(builderForValue.build()); + } + configPolicyCase_ = 2; + return this; + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * will use the provided configuration values, overwriting any requested
+       * configuration values.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOverwriteConfigValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper value) { + if (overwriteConfigValuesBuilder_ == null) { + if (configPolicyCase_ == 2 + && configPolicy_ + != com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + .getDefaultInstance()) { + configPolicy_ = + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.newBuilder( + (com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + configPolicy_) + .mergeFrom(value) + .buildPartial(); + } else { + configPolicy_ = value; + } + onChanged(); + } else { + if (configPolicyCase_ == 2) { + overwriteConfigValuesBuilder_.mergeFrom(value); + } + overwriteConfigValuesBuilder_.setMessage(value); + } + configPolicyCase_ = 2; + return this; + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * will use the provided configuration values, overwriting any requested
+       * configuration values.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOverwriteConfigValues() { + if (overwriteConfigValuesBuilder_ == null) { + if (configPolicyCase_ == 2) { + configPolicyCase_ = 0; + configPolicy_ = null; + onChanged(); + } + } else { + if (configPolicyCase_ == 2) { + configPolicyCase_ = 0; + configPolicy_ = null; + } + overwriteConfigValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * will use the provided configuration values, overwriting any requested
+       * configuration values.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder + getOverwriteConfigValuesBuilder() { + return getOverwriteConfigValuesFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * will use the provided configuration values, overwriting any requested
+       * configuration values.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder + getOverwriteConfigValuesOrBuilder() { + if ((configPolicyCase_ == 2) && (overwriteConfigValuesBuilder_ != null)) { + return overwriteConfigValuesBuilder_.getMessageOrBuilder(); + } else { + if (configPolicyCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + configPolicy_; + } + return com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+       * will use the provided configuration values, overwriting any requested
+       * configuration values.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper overwrite_config_values = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder> + getOverwriteConfigValuesFieldBuilder() { + if (overwriteConfigValuesBuilder_ == null) { + if (!(configPolicyCase_ == 2)) { + configPolicy_ = + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + .getDefaultInstance(); + } + overwriteConfigValuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder>( + (com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) configPolicy_, + getParentForChildren(), + isClean()); + configPolicy_ = null; + } + configPolicyCase_ = 2; + onChanged(); + ; + return overwriteConfigValuesBuilder_; + } + + private java.util.List + allowedLocationsAndOrganizations_ = java.util.Collections.emptyList(); + + private void ensureAllowedLocationsAndOrganizationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedLocationsAndOrganizations_ = + new java.util.ArrayList( + allowedLocationsAndOrganizations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Subject, + com.google.cloud.security.privateca.v1beta1.Subject.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder> + allowedLocationsAndOrganizationsBuilder_; + + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAllowedLocationsAndOrganizationsList() { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(allowedLocationsAndOrganizations_); + } else { + return allowedLocationsAndOrganizationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAllowedLocationsAndOrganizationsCount() { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + return allowedLocationsAndOrganizations_.size(); + } else { + return allowedLocationsAndOrganizationsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.Subject + getAllowedLocationsAndOrganizations(int index) { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + return allowedLocationsAndOrganizations_.get(index); + } else { + return allowedLocationsAndOrganizationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAllowedLocationsAndOrganizations( + int index, com.google.cloud.security.privateca.v1beta1.Subject value) { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedLocationsAndOrganizationsIsMutable(); + allowedLocationsAndOrganizations_.set(index, value); + onChanged(); + } else { + allowedLocationsAndOrganizationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAllowedLocationsAndOrganizations( + int index, com.google.cloud.security.privateca.v1beta1.Subject.Builder builderForValue) { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + ensureAllowedLocationsAndOrganizationsIsMutable(); + allowedLocationsAndOrganizations_.set(index, builderForValue.build()); + onChanged(); + } else { + allowedLocationsAndOrganizationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllowedLocationsAndOrganizations( + com.google.cloud.security.privateca.v1beta1.Subject value) { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedLocationsAndOrganizationsIsMutable(); + allowedLocationsAndOrganizations_.add(value); + onChanged(); + } else { + allowedLocationsAndOrganizationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllowedLocationsAndOrganizations( + int index, com.google.cloud.security.privateca.v1beta1.Subject value) { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedLocationsAndOrganizationsIsMutable(); + allowedLocationsAndOrganizations_.add(index, value); + onChanged(); + } else { + allowedLocationsAndOrganizationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllowedLocationsAndOrganizations( + com.google.cloud.security.privateca.v1beta1.Subject.Builder builderForValue) { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + ensureAllowedLocationsAndOrganizationsIsMutable(); + allowedLocationsAndOrganizations_.add(builderForValue.build()); + onChanged(); + } else { + allowedLocationsAndOrganizationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllowedLocationsAndOrganizations( + int index, com.google.cloud.security.privateca.v1beta1.Subject.Builder builderForValue) { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + ensureAllowedLocationsAndOrganizationsIsMutable(); + allowedLocationsAndOrganizations_.add(index, builderForValue.build()); + onChanged(); + } else { + allowedLocationsAndOrganizationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAllowedLocationsAndOrganizations( + java.lang.Iterable + values) { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + ensureAllowedLocationsAndOrganizationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, allowedLocationsAndOrganizations_); + onChanged(); + } else { + allowedLocationsAndOrganizationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAllowedLocationsAndOrganizations() { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + allowedLocationsAndOrganizations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + allowedLocationsAndOrganizationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAllowedLocationsAndOrganizations(int index) { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + ensureAllowedLocationsAndOrganizationsIsMutable(); + allowedLocationsAndOrganizations_.remove(index); + onChanged(); + } else { + allowedLocationsAndOrganizationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.Subject.Builder + getAllowedLocationsAndOrganizationsBuilder(int index) { + return getAllowedLocationsAndOrganizationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder + getAllowedLocationsAndOrganizationsOrBuilder(int index) { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + return allowedLocationsAndOrganizations_.get(index); + } else { + return allowedLocationsAndOrganizationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAllowedLocationsAndOrganizationsOrBuilderList() { + if (allowedLocationsAndOrganizationsBuilder_ != null) { + return allowedLocationsAndOrganizationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(allowedLocationsAndOrganizations_); + } + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.Subject.Builder + addAllowedLocationsAndOrganizationsBuilder() { + return getAllowedLocationsAndOrganizationsFieldBuilder() + .addBuilder(com.google.cloud.security.privateca.v1beta1.Subject.getDefaultInstance()); + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.Subject.Builder + addAllowedLocationsAndOrganizationsBuilder(int index) { + return getAllowedLocationsAndOrganizationsFieldBuilder() + .addBuilder( + index, com.google.cloud.security.privateca.v1beta1.Subject.getDefaultInstance()); + } + /** + * + * + *
+       * Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
+       * field, any value will be allowed for that field.
+       * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.Subject allowed_locations_and_organizations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAllowedLocationsAndOrganizationsBuilderList() { + return getAllowedLocationsAndOrganizationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Subject, + com.google.cloud.security.privateca.v1beta1.Subject.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder> + getAllowedLocationsAndOrganizationsFieldBuilder() { + if (allowedLocationsAndOrganizationsBuilder_ == null) { + allowedLocationsAndOrganizationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Subject, + com.google.cloud.security.privateca.v1beta1.Subject.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder>( + allowedLocationsAndOrganizations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + allowedLocationsAndOrganizations_ = null; + } + return allowedLocationsAndOrganizationsBuilder_; + } + + private com.google.protobuf.LazyStringList allowedCommonNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAllowedCommonNamesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + allowedCommonNames_ = new com.google.protobuf.LazyStringArrayList(allowedCommonNames_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * Optional. If any value is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed value. If no value is specified, all values
+       * will be allowed for this fied. Glob patterns are also supported.
+       * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedCommonNames. + */ + public com.google.protobuf.ProtocolStringList getAllowedCommonNamesList() { + return allowedCommonNames_.getUnmodifiableView(); + } + /** + * + * + *
+       * Optional. If any value is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed value. If no value is specified, all values
+       * will be allowed for this fied. Glob patterns are also supported.
+       * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedCommonNames. + */ + public int getAllowedCommonNamesCount() { + return allowedCommonNames_.size(); + } + /** + * + * + *
+       * Optional. If any value is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed value. If no value is specified, all values
+       * will be allowed for this fied. Glob patterns are also supported.
+       * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedCommonNames at the given index. + */ + public java.lang.String getAllowedCommonNames(int index) { + return allowedCommonNames_.get(index); + } + /** + * + * + *
+       * Optional. If any value is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed value. If no value is specified, all values
+       * will be allowed for this fied. Glob patterns are also supported.
+       * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedCommonNames at the given index. + */ + public com.google.protobuf.ByteString getAllowedCommonNamesBytes(int index) { + return allowedCommonNames_.getByteString(index); + } + /** + * + * + *
+       * Optional. If any value is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed value. If no value is specified, all values
+       * will be allowed for this fied. Glob patterns are also supported.
+       * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The allowedCommonNames to set. + * @return This builder for chaining. + */ + public Builder setAllowedCommonNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedCommonNamesIsMutable(); + allowedCommonNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If any value is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed value. If no value is specified, all values
+       * will be allowed for this fied. Glob patterns are also supported.
+       * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The allowedCommonNames to add. + * @return This builder for chaining. + */ + public Builder addAllowedCommonNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedCommonNamesIsMutable(); + allowedCommonNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If any value is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed value. If no value is specified, all values
+       * will be allowed for this fied. Glob patterns are also supported.
+       * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The allowedCommonNames to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedCommonNames(java.lang.Iterable values) { + ensureAllowedCommonNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedCommonNames_); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If any value is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed value. If no value is specified, all values
+       * will be allowed for this fied. Glob patterns are also supported.
+       * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowedCommonNames() { + allowedCommonNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If any value is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match at least one listed value. If no value is specified, all values
+       * will be allowed for this fied. Glob patterns are also supported.
+       * 
+ * + * repeated string allowed_common_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the allowedCommonNames to add. + * @return This builder for chaining. + */ + public Builder addAllowedCommonNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedCommonNamesIsMutable(); + allowedCommonNames_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + allowedSans_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNamesOrBuilder> + allowedSansBuilder_; + /** + * + * + *
+       * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+       * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+       * field.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allowedSans field is set. + */ + public boolean hasAllowedSans() { + return allowedSansBuilder_ != null || allowedSans_ != null; + } + /** + * + * + *
+       * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+       * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+       * field.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowedSans. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + getAllowedSans() { + if (allowedSansBuilder_ == null) { + return allowedSans_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.getDefaultInstance() + : allowedSans_; + } else { + return allowedSansBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+       * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+       * field.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAllowedSans( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + value) { + if (allowedSansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + allowedSans_ = value; + onChanged(); + } else { + allowedSansBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+       * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+       * field.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAllowedSans( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.Builder + builderForValue) { + if (allowedSansBuilder_ == null) { + allowedSans_ = builderForValue.build(); + onChanged(); + } else { + allowedSansBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+       * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+       * field.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAllowedSans( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames + value) { + if (allowedSansBuilder_ == null) { + if (allowedSans_ != null) { + allowedSans_ = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.newBuilder(allowedSans_) + .mergeFrom(value) + .buildPartial(); + } else { + allowedSans_ = value; + } + onChanged(); + } else { + allowedSansBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+       * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+       * field.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAllowedSans() { + if (allowedSansBuilder_ == null) { + allowedSans_ = null; + onChanged(); + } else { + allowedSans_ = null; + allowedSansBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+       * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+       * field.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.Builder + getAllowedSansBuilder() { + + onChanged(); + return getAllowedSansFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+       * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+       * field.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNamesOrBuilder + getAllowedSansOrBuilder() { + if (allowedSansBuilder_ != null) { + return allowedSansBuilder_.getMessageOrBuilder(); + } else { + return allowedSans_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.getDefaultInstance() + : allowedSans_; + } + } + /** + * + * + *
+       * Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
+       * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
+       * match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
+       * is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
+       * field.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames allowed_sans = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNamesOrBuilder> + getAllowedSansFieldBuilder() { + if (allowedSansBuilder_ == null) { + allowedSansBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNames.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.AllowedSubjectAltNamesOrBuilder>( + getAllowedSans(), getParentForChildren(), isClean()); + allowedSans_ = null; + } + return allowedSansBuilder_; + } + + private com.google.protobuf.Duration maximumLifetime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + maximumLifetimeBuilder_; + /** + * + * + *
+       * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+       * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+       * requested maximum_lifetime, the effective lifetime will be explicitly
+       * truncated.
+       * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the maximumLifetime field is set. + */ + public boolean hasMaximumLifetime() { + return maximumLifetimeBuilder_ != null || maximumLifetime_ != null; + } + /** + * + * + *
+       * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+       * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+       * requested maximum_lifetime, the effective lifetime will be explicitly
+       * truncated.
+       * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maximumLifetime. + */ + public com.google.protobuf.Duration getMaximumLifetime() { + if (maximumLifetimeBuilder_ == null) { + return maximumLifetime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumLifetime_; + } else { + return maximumLifetimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+       * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+       * requested maximum_lifetime, the effective lifetime will be explicitly
+       * truncated.
+       * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMaximumLifetime(com.google.protobuf.Duration value) { + if (maximumLifetimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maximumLifetime_ = value; + onChanged(); + } else { + maximumLifetimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+       * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+       * requested maximum_lifetime, the effective lifetime will be explicitly
+       * truncated.
+       * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMaximumLifetime(com.google.protobuf.Duration.Builder builderForValue) { + if (maximumLifetimeBuilder_ == null) { + maximumLifetime_ = builderForValue.build(); + onChanged(); + } else { + maximumLifetimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+       * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+       * requested maximum_lifetime, the effective lifetime will be explicitly
+       * truncated.
+       * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMaximumLifetime(com.google.protobuf.Duration value) { + if (maximumLifetimeBuilder_ == null) { + if (maximumLifetime_ != null) { + maximumLifetime_ = + com.google.protobuf.Duration.newBuilder(maximumLifetime_) + .mergeFrom(value) + .buildPartial(); + } else { + maximumLifetime_ = value; + } + onChanged(); + } else { + maximumLifetimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+       * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+       * requested maximum_lifetime, the effective lifetime will be explicitly
+       * truncated.
+       * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMaximumLifetime() { + if (maximumLifetimeBuilder_ == null) { + maximumLifetime_ = null; + onChanged(); + } else { + maximumLifetime_ = null; + maximumLifetimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+       * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+       * requested maximum_lifetime, the effective lifetime will be explicitly
+       * truncated.
+       * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getMaximumLifetimeBuilder() { + + onChanged(); + return getMaximumLifetimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+       * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+       * requested maximum_lifetime, the effective lifetime will be explicitly
+       * truncated.
+       * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getMaximumLifetimeOrBuilder() { + if (maximumLifetimeBuilder_ != null) { + return maximumLifetimeBuilder_.getMessageOrBuilder(); + } else { + return maximumLifetime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumLifetime_; + } + } + /** + * + * + *
+       * Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
+       * if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
+       * requested maximum_lifetime, the effective lifetime will be explicitly
+       * truncated.
+       * 
+ * + * + * .google.protobuf.Duration maximum_lifetime = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMaximumLifetimeFieldBuilder() { + if (maximumLifetimeBuilder_ == null) { + maximumLifetimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMaximumLifetime(), getParentForChildren(), isClean()); + maximumLifetime_ = null; + } + return maximumLifetimeBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + allowedIssuanceModes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModesOrBuilder> + allowedIssuanceModesBuilder_; + /** + * + * + *
+       * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+       * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allowedIssuanceModes field is set. + */ + public boolean hasAllowedIssuanceModes() { + return allowedIssuanceModesBuilder_ != null || allowedIssuanceModes_ != null; + } + /** + * + * + *
+       * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+       * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allowedIssuanceModes. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + getAllowedIssuanceModes() { + if (allowedIssuanceModesBuilder_ == null) { + return allowedIssuanceModes_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.getDefaultInstance() + : allowedIssuanceModes_; + } else { + return allowedIssuanceModesBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+       * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAllowedIssuanceModes( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + value) { + if (allowedIssuanceModesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + allowedIssuanceModes_ = value; + onChanged(); + } else { + allowedIssuanceModesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+       * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAllowedIssuanceModes( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.Builder + builderForValue) { + if (allowedIssuanceModesBuilder_ == null) { + allowedIssuanceModes_ = builderForValue.build(); + onChanged(); + } else { + allowedIssuanceModesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+       * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAllowedIssuanceModes( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes + value) { + if (allowedIssuanceModesBuilder_ == null) { + if (allowedIssuanceModes_ != null) { + allowedIssuanceModes_ = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.newBuilder(allowedIssuanceModes_) + .mergeFrom(value) + .buildPartial(); + } else { + allowedIssuanceModes_ = value; + } + onChanged(); + } else { + allowedIssuanceModesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+       * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAllowedIssuanceModes() { + if (allowedIssuanceModesBuilder_ == null) { + allowedIssuanceModes_ = null; + onChanged(); + } else { + allowedIssuanceModes_ = null; + allowedIssuanceModesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+       * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.Builder + getAllowedIssuanceModesBuilder() { + + onChanged(); + return getAllowedIssuanceModesFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+       * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModesOrBuilder + getAllowedIssuanceModesOrBuilder() { + if (allowedIssuanceModesBuilder_ != null) { + return allowedIssuanceModesBuilder_.getMessageOrBuilder(); + } else { + return allowedIssuanceModes_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.getDefaultInstance() + : allowedIssuanceModes_; + } + } + /** + * + * + *
+       * Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
+       * used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes allowed_issuance_modes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModesOrBuilder> + getAllowedIssuanceModesFieldBuilder() { + if (allowedIssuanceModesBuilder_ == null) { + allowedIssuanceModesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModes.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.IssuanceModesOrBuilder>( + getAllowedIssuanceModes(), getParentForChildren(), isClean()); + allowedIssuanceModes_ = null; + } + return allowedIssuanceModesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy) + private static final com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateAuthorityPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CertificateAuthorityPolicy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AccessUrlsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is
+     * published. This will only be set for CAs that have been activated.
+     * 
+ * + * string ca_certificate_access_url = 1; + * + * @return The caCertificateAccessUrl. + */ + java.lang.String getCaCertificateAccessUrl(); + /** + * + * + *
+     * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is
+     * published. This will only be set for CAs that have been activated.
+     * 
+ * + * string ca_certificate_access_url = 1; + * + * @return The bytes for caCertificateAccessUrl. + */ + com.google.protobuf.ByteString getCaCertificateAccessUrlBytes(); + + /** + * + * + *
+     * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This
+     * will only be set for CAs that have been activated.
+     * 
+ * + * string crl_access_url = 2; + * + * @return The crlAccessUrl. + */ + java.lang.String getCrlAccessUrl(); + /** + * + * + *
+     * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This
+     * will only be set for CAs that have been activated.
+     * 
+ * + * string crl_access_url = 2; + * + * @return The bytes for crlAccessUrl. + */ + com.google.protobuf.ByteString getCrlAccessUrlBytes(); + } + /** + * + * + *
+   * URLs where a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will publish content.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls} + */ + public static final class AccessUrls extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls) + AccessUrlsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccessUrls.newBuilder() to construct. + private AccessUrls(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AccessUrls() { + caCertificateAccessUrl_ = ""; + crlAccessUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AccessUrls(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AccessUrls( + 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(); + + caCertificateAccessUrl_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + crlAccessUrl_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_AccessUrls_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_AccessUrls_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.Builder + .class); + } + + public static final int CA_CERTIFICATE_ACCESS_URL_FIELD_NUMBER = 1; + private volatile java.lang.Object caCertificateAccessUrl_; + /** + * + * + *
+     * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is
+     * published. This will only be set for CAs that have been activated.
+     * 
+ * + * string ca_certificate_access_url = 1; + * + * @return The caCertificateAccessUrl. + */ + @java.lang.Override + public java.lang.String getCaCertificateAccessUrl() { + java.lang.Object ref = caCertificateAccessUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + caCertificateAccessUrl_ = s; + return s; + } + } + /** + * + * + *
+     * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is
+     * published. This will only be set for CAs that have been activated.
+     * 
+ * + * string ca_certificate_access_url = 1; + * + * @return The bytes for caCertificateAccessUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCaCertificateAccessUrlBytes() { + java.lang.Object ref = caCertificateAccessUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + caCertificateAccessUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CRL_ACCESS_URL_FIELD_NUMBER = 2; + private volatile java.lang.Object crlAccessUrl_; + /** + * + * + *
+     * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This
+     * will only be set for CAs that have been activated.
+     * 
+ * + * string crl_access_url = 2; + * + * @return The crlAccessUrl. + */ + @java.lang.Override + public java.lang.String getCrlAccessUrl() { + java.lang.Object ref = crlAccessUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + crlAccessUrl_ = s; + return s; + } + } + /** + * + * + *
+     * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This
+     * will only be set for CAs that have been activated.
+     * 
+ * + * string crl_access_url = 2; + * + * @return The bytes for crlAccessUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCrlAccessUrlBytes() { + java.lang.Object ref = crlAccessUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crlAccessUrl_ = 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 (!getCaCertificateAccessUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, caCertificateAccessUrl_); + } + if (!getCrlAccessUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, crlAccessUrl_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCaCertificateAccessUrlBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(1, caCertificateAccessUrl_); + } + if (!getCrlAccessUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, crlAccessUrl_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls other = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls) obj; + + if (!getCaCertificateAccessUrl().equals(other.getCaCertificateAccessUrl())) return false; + if (!getCrlAccessUrl().equals(other.getCrlAccessUrl())) return false; + if (!unknownFields.equals(other.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) + CA_CERTIFICATE_ACCESS_URL_FIELD_NUMBER; + hash = (53 * hash) + getCaCertificateAccessUrl().hashCode(); + hash = (37 * hash) + CRL_ACCESS_URL_FIELD_NUMBER; + hash = (53 * hash) + getCrlAccessUrl().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * URLs where a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will publish content.
+     * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls) + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrlsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_AccessUrls_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_AccessUrls_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + caCertificateAccessUrl_ = ""; + + crlAccessUrl_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_AccessUrls_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls build() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls result = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls(this); + result.caCertificateAccessUrl_ = caCertificateAccessUrl_; + result.crlAccessUrl_ = crlAccessUrl_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + .getDefaultInstance()) return this; + if (!other.getCaCertificateAccessUrl().isEmpty()) { + caCertificateAccessUrl_ = other.caCertificateAccessUrl_; + onChanged(); + } + if (!other.getCrlAccessUrl().isEmpty()) { + crlAccessUrl_ = other.crlAccessUrl_; + 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.security.privateca.v1beta1.CertificateAuthority.AccessUrls parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object caCertificateAccessUrl_ = ""; + /** + * + * + *
+       * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is
+       * published. This will only be set for CAs that have been activated.
+       * 
+ * + * string ca_certificate_access_url = 1; + * + * @return The caCertificateAccessUrl. + */ + public java.lang.String getCaCertificateAccessUrl() { + java.lang.Object ref = caCertificateAccessUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + caCertificateAccessUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is
+       * published. This will only be set for CAs that have been activated.
+       * 
+ * + * string ca_certificate_access_url = 1; + * + * @return The bytes for caCertificateAccessUrl. + */ + public com.google.protobuf.ByteString getCaCertificateAccessUrlBytes() { + java.lang.Object ref = caCertificateAccessUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + caCertificateAccessUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is
+       * published. This will only be set for CAs that have been activated.
+       * 
+ * + * string ca_certificate_access_url = 1; + * + * @param value The caCertificateAccessUrl to set. + * @return This builder for chaining. + */ + public Builder setCaCertificateAccessUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + caCertificateAccessUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is
+       * published. This will only be set for CAs that have been activated.
+       * 
+ * + * string ca_certificate_access_url = 1; + * + * @return This builder for chaining. + */ + public Builder clearCaCertificateAccessUrl() { + + caCertificateAccessUrl_ = getDefaultInstance().getCaCertificateAccessUrl(); + onChanged(); + return this; + } + /** + * + * + *
+       * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is
+       * published. This will only be set for CAs that have been activated.
+       * 
+ * + * string ca_certificate_access_url = 1; + * + * @param value The bytes for caCertificateAccessUrl to set. + * @return This builder for chaining. + */ + public Builder setCaCertificateAccessUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + caCertificateAccessUrl_ = value; + onChanged(); + return this; + } + + private java.lang.Object crlAccessUrl_ = ""; + /** + * + * + *
+       * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This
+       * will only be set for CAs that have been activated.
+       * 
+ * + * string crl_access_url = 2; + * + * @return The crlAccessUrl. + */ + public java.lang.String getCrlAccessUrl() { + java.lang.Object ref = crlAccessUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + crlAccessUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This
+       * will only be set for CAs that have been activated.
+       * 
+ * + * string crl_access_url = 2; + * + * @return The bytes for crlAccessUrl. + */ + public com.google.protobuf.ByteString getCrlAccessUrlBytes() { + java.lang.Object ref = crlAccessUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crlAccessUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This
+       * will only be set for CAs that have been activated.
+       * 
+ * + * string crl_access_url = 2; + * + * @param value The crlAccessUrl to set. + * @return This builder for chaining. + */ + public Builder setCrlAccessUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + crlAccessUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This
+       * will only be set for CAs that have been activated.
+       * 
+ * + * string crl_access_url = 2; + * + * @return This builder for chaining. + */ + public Builder clearCrlAccessUrl() { + + crlAccessUrl_ = getDefaultInstance().getCrlAccessUrl(); + onChanged(); + return this; + } + /** + * + * + *
+       * The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This
+       * will only be set for CAs that have been activated.
+       * 
+ * + * string crl_access_url = 2; + * + * @param value The bytes for crlAccessUrl to set. + * @return This builder for chaining. + */ + public Builder setCrlAccessUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + crlAccessUrl_ = 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.security.privateca.v1beta1.CertificateAuthority.AccessUrls) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls) + private static final com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccessUrls parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AccessUrls(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KeyVersionSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the
+     * format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
+     * This option enables full flexibility in the key's capabilities and
+     * properties.
+     * 
+ * + * string cloud_kms_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cloudKmsKeyVersion. + */ + java.lang.String getCloudKmsKeyVersion(); + /** + * + * + *
+     * Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the
+     * format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
+     * This option enables full flexibility in the key's capabilities and
+     * properties.
+     * 
+ * + * string cloud_kms_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for cloudKmsKeyVersion. + */ + com.google.protobuf.ByteString getCloudKmsKeyVersionBytes(); + + /** + * + * + *
+     * Required. The algorithm to use for creating a managed Cloud KMS key for a for a
+     * simplified experience. All managed keys will be have their
+     * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for algorithm. + */ + int getAlgorithmValue(); + /** + * + * + *
+     * Required. The algorithm to use for creating a managed Cloud KMS key for a for a
+     * simplified experience. All managed keys will be have their
+     * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The algorithm. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + getAlgorithm(); + + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .KeyVersionCase + getKeyVersionCase(); + } + /** + * + * + *
+   * A Cloud KMS key configuration that a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will use.
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec} + */ + public static final class KeyVersionSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec) + KeyVersionSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use KeyVersionSpec.newBuilder() to construct. + private KeyVersionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KeyVersionSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KeyVersionSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private KeyVersionSpec( + 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(); + keyVersionCase_ = 1; + keyVersion_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + keyVersionCase_ = 2; + keyVersion_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_KeyVersionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_KeyVersionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .Builder.class); + } + + private int keyVersionCase_ = 0; + private java.lang.Object keyVersion_; + + public enum KeyVersionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_KMS_KEY_VERSION(1), + ALGORITHM(2), + KEYVERSION_NOT_SET(0); + private final int value; + + private KeyVersionCase(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 KeyVersionCase valueOf(int value) { + return forNumber(value); + } + + public static KeyVersionCase forNumber(int value) { + switch (value) { + case 1: + return CLOUD_KMS_KEY_VERSION; + case 2: + return ALGORITHM; + case 0: + return KEYVERSION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KeyVersionCase getKeyVersionCase() { + return KeyVersionCase.forNumber(keyVersionCase_); + } + + public static final int CLOUD_KMS_KEY_VERSION_FIELD_NUMBER = 1; + /** + * + * + *
+     * Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the
+     * format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
+     * This option enables full flexibility in the key's capabilities and
+     * properties.
+     * 
+ * + * string cloud_kms_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cloudKmsKeyVersion. + */ + public java.lang.String getCloudKmsKeyVersion() { + java.lang.Object ref = ""; + if (keyVersionCase_ == 1) { + ref = keyVersion_; + } + if (ref instanceof java.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 (keyVersionCase_ == 1) { + keyVersion_ = s; + } + return s; + } + } + /** + * + * + *
+     * Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the
+     * format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
+     * This option enables full flexibility in the key's capabilities and
+     * properties.
+     * 
+ * + * string cloud_kms_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for cloudKmsKeyVersion. + */ + public com.google.protobuf.ByteString getCloudKmsKeyVersionBytes() { + java.lang.Object ref = ""; + if (keyVersionCase_ == 1) { + ref = keyVersion_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyVersionCase_ == 1) { + keyVersion_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALGORITHM_FIELD_NUMBER = 2; + /** + * + * + *
+     * Required. The algorithm to use for creating a managed Cloud KMS key for a for a
+     * simplified experience. All managed keys will be have their
+     * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for algorithm. + */ + public int getAlgorithmValue() { + if (keyVersionCase_ == 2) { + return (java.lang.Integer) keyVersion_; + } + return 0; + } + /** + * + * + *
+     * Required. The algorithm to use for creating a managed Cloud KMS key for a for a
+     * simplified experience. All managed keys will be have their
+     * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The algorithm. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + getAlgorithm() { + if (keyVersionCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm result = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + .valueOf((java.lang.Integer) keyVersion_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + .UNRECOGNIZED + : result; + } + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + .SIGN_HASH_ALGORITHM_UNSPECIFIED; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (keyVersionCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyVersion_); + } + if (keyVersionCase_ == 2) { + output.writeEnum(2, ((java.lang.Integer) keyVersion_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (keyVersionCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyVersion_); + } + if (keyVersionCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 2, ((java.lang.Integer) keyVersion_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec other = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec) obj; + + if (!getKeyVersionCase().equals(other.getKeyVersionCase())) return false; + switch (keyVersionCase_) { + case 1: + if (!getCloudKmsKeyVersion().equals(other.getCloudKmsKeyVersion())) return false; + break; + case 2: + if (getAlgorithmValue() != other.getAlgorithmValue()) 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 (keyVersionCase_) { + case 1: + hash = (37 * hash) + CLOUD_KMS_KEY_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getCloudKmsKeyVersion().hashCode(); + break; + case 2: + hash = (37 * hash) + ALGORITHM_FIELD_NUMBER; + hash = (53 * hash) + getAlgorithmValue(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 Cloud KMS key configuration that a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will use.
+     * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec) + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_KeyVersionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_KeyVersionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + keyVersionCase_ = 0; + keyVersion_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_KeyVersionSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + build() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec result = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec( + this); + if (keyVersionCase_ == 1) { + result.keyVersion_ = keyVersion_; + } + if (keyVersionCase_ == 2) { + result.keyVersion_ = keyVersion_; + } + result.keyVersionCase_ = keyVersionCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .getDefaultInstance()) return this; + switch (other.getKeyVersionCase()) { + case CLOUD_KMS_KEY_VERSION: + { + keyVersionCase_ = 1; + keyVersion_ = other.keyVersion_; + onChanged(); + break; + } + case ALGORITHM: + { + setAlgorithmValue(other.getAlgorithmValue()); + break; + } + case KEYVERSION_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.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int keyVersionCase_ = 0; + private java.lang.Object keyVersion_; + + public KeyVersionCase getKeyVersionCase() { + return KeyVersionCase.forNumber(keyVersionCase_); + } + + public Builder clearKeyVersion() { + keyVersionCase_ = 0; + keyVersion_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the
+       * format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
+       * This option enables full flexibility in the key's capabilities and
+       * properties.
+       * 
+ * + * string cloud_kms_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cloudKmsKeyVersion. + */ + @java.lang.Override + public java.lang.String getCloudKmsKeyVersion() { + java.lang.Object ref = ""; + if (keyVersionCase_ == 1) { + ref = keyVersion_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (keyVersionCase_ == 1) { + keyVersion_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the
+       * format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
+       * This option enables full flexibility in the key's capabilities and
+       * properties.
+       * 
+ * + * string cloud_kms_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for cloudKmsKeyVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudKmsKeyVersionBytes() { + java.lang.Object ref = ""; + if (keyVersionCase_ == 1) { + ref = keyVersion_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyVersionCase_ == 1) { + keyVersion_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the
+       * format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
+       * This option enables full flexibility in the key's capabilities and
+       * properties.
+       * 
+ * + * string cloud_kms_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The cloudKmsKeyVersion to set. + * @return This builder for chaining. + */ + public Builder setCloudKmsKeyVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyVersionCase_ = 1; + keyVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the
+       * format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
+       * This option enables full flexibility in the key's capabilities and
+       * properties.
+       * 
+ * + * string cloud_kms_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCloudKmsKeyVersion() { + if (keyVersionCase_ == 1) { + keyVersionCase_ = 0; + keyVersion_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the
+       * format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
+       * This option enables full flexibility in the key's capabilities and
+       * properties.
+       * 
+ * + * string cloud_kms_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for cloudKmsKeyVersion to set. + * @return This builder for chaining. + */ + public Builder setCloudKmsKeyVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + keyVersionCase_ = 1; + keyVersion_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The algorithm to use for creating a managed Cloud KMS key for a for a
+       * simplified experience. All managed keys will be have their
+       * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for algorithm. + */ + @java.lang.Override + public int getAlgorithmValue() { + if (keyVersionCase_ == 2) { + return ((java.lang.Integer) keyVersion_).intValue(); + } + return 0; + } + /** + * + * + *
+       * Required. The algorithm to use for creating a managed Cloud KMS key for a for a
+       * simplified experience. All managed keys will be have their
+       * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for algorithm to set. + * @return This builder for chaining. + */ + public Builder setAlgorithmValue(int value) { + keyVersionCase_ = 2; + keyVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The algorithm to use for creating a managed Cloud KMS key for a for a
+       * simplified experience. All managed keys will be have their
+       * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The algorithm. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + getAlgorithm() { + if (keyVersionCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + result = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + .valueOf((java.lang.Integer) keyVersion_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + .UNRECOGNIZED + : result; + } + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + .SIGN_HASH_ALGORITHM_UNSPECIFIED; + } + /** + * + * + *
+       * Required. The algorithm to use for creating a managed Cloud KMS key for a for a
+       * simplified experience. All managed keys will be have their
+       * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The algorithm to set. + * @return This builder for chaining. + */ + public Builder setAlgorithm( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + value) { + if (value == null) { + throw new NullPointerException(); + } + keyVersionCase_ = 2; + keyVersion_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The algorithm to use for creating a managed Cloud KMS key for a for a
+       * simplified experience. All managed keys will be have their
+       * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearAlgorithm() { + if (keyVersionCase_ == 2) { + keyVersionCase_ = 0; + keyVersion_ = null; + 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.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec) + private static final com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .KeyVersionSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeyVersionSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KeyVersionSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * 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 TYPE_FIELD_NUMBER = 2; + private int type_; + /** + * + * + *
+   * Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type result = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.valueOf(type_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.UNRECOGNIZED + : result; + } + + public static final int TIER_FIELD_NUMBER = 3; + private int tier_; + /** + * + * + *
+   * Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier tier = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for tier. + */ + @java.lang.Override + public int getTierValue() { + return tier_; + } + /** + * + * + *
+   * Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier tier = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The tier. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier getTier() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier result = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier.valueOf(tier_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier.UNRECOGNIZED + : result; + } + + public static final int CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.security.privateca.v1beta1.CertificateConfig config_; + /** + * + * + *
+   * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return config_ != null; + } + /** + * + * + *
+   * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig getConfig() { + return config_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateConfig.getDefaultInstance() + : config_; + } + /** + * + * + *
+   * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder + getConfigOrBuilder() { + return getConfig(); + } + + public static final int LIFETIME_FIELD_NUMBER = 5; + private com.google.protobuf.Duration lifetime_; + /** + * + * + *
+   * Required. The desired lifetime of the CA certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate.
+   * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the lifetime field is set. + */ + @java.lang.Override + public boolean hasLifetime() { + return lifetime_ != null; + } + /** + * + * + *
+   * Required. The desired lifetime of the CA certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate.
+   * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lifetime. + */ + @java.lang.Override + public com.google.protobuf.Duration getLifetime() { + return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_; + } + /** + * + * + *
+   * Required. The desired lifetime of the CA certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate.
+   * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getLifetimeOrBuilder() { + return getLifetime(); + } + + public static final int KEY_SPEC_FIELD_NUMBER = 6; + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec keySpec_; + /** + * + * + *
+   * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+   * is also used to sign the self-signed CA certificate. Otherwise, it
+   * is used to sign a CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the keySpec field is set. + */ + @java.lang.Override + public boolean hasKeySpec() { + return keySpec_ != null; + } + /** + * + * + *
+   * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+   * is also used to sign the self-signed CA certificate. Otherwise, it
+   * is used to sign a CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The keySpec. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + getKeySpec() { + return keySpec_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .getDefaultInstance() + : keySpec_; + } + /** + * + * + *
+   * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+   * is also used to sign the self-signed CA certificate. Otherwise, it
+   * is used to sign a CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpecOrBuilder + getKeySpecOrBuilder() { + return getKeySpec(); + } + + public static final int CERTIFICATE_POLICY_FIELD_NUMBER = 7; + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + certificatePolicy_; + /** + * + * + *
+   * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the certificatePolicy field is set. + */ + @java.lang.Override + public boolean hasCertificatePolicy() { + return certificatePolicy_ != null; + } + /** + * + * + *
+   * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The certificatePolicy. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + getCertificatePolicy() { + return certificatePolicy_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.getDefaultInstance() + : certificatePolicy_; + } + /** + * + * + *
+   * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicyOrBuilder + getCertificatePolicyOrBuilder() { + return getCertificatePolicy(); + } + + public static final int ISSUING_OPTIONS_FIELD_NUMBER = 8; + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + issuingOptions_; + /** + * + * + *
+   * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+   * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the issuingOptions field is set. + */ + @java.lang.Override + public boolean hasIssuingOptions() { + return issuingOptions_ != null; + } + /** + * + * + *
+   * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+   * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The issuingOptions. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + getIssuingOptions() { + return issuingOptions_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + .getDefaultInstance() + : issuingOptions_; + } + /** + * + * + *
+   * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+   * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptionsOrBuilder + getIssuingOptionsOrBuilder() { + return getIssuingOptions(); + } + + public static final int SUBORDINATE_CONFIG_FIELD_NUMBER = 19; + private com.google.cloud.security.privateca.v1beta1.SubordinateConfig subordinateConfig_; + /** + * + * + *
+   * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+   * with the subordinate configuration, which describes its issuers. This may
+   * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subordinateConfig field is set. + */ + @java.lang.Override + public boolean hasSubordinateConfig() { + return subordinateConfig_ != null; + } + /** + * + * + *
+   * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+   * with the subordinate configuration, which describes its issuers. This may
+   * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subordinateConfig. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig getSubordinateConfig() { + return subordinateConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.SubordinateConfig.getDefaultInstance() + : subordinateConfig_; + } + /** + * + * + *
+   * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+   * with the subordinate configuration, which describes its issuers. This may
+   * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder + getSubordinateConfigOrBuilder() { + return getSubordinateConfig(); + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_; + /** + * + * + *
+   * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State result = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State.valueOf(state_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State.UNRECOGNIZED + : result; + } + + public static final int PEM_CA_CERTIFICATES_FIELD_NUMBER = 9; + private com.google.protobuf.LazyStringList pemCaCertificates_; + /** + * + * + *
+   * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+   * is the final element (consistent with RFC 5246). For a self-signed CA, this
+   * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+   * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the pemCaCertificates. + */ + public com.google.protobuf.ProtocolStringList getPemCaCertificatesList() { + return pemCaCertificates_; + } + /** + * + * + *
+   * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+   * is the final element (consistent with RFC 5246). For a self-signed CA, this
+   * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+   * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of pemCaCertificates. + */ + public int getPemCaCertificatesCount() { + return pemCaCertificates_.size(); + } + /** + * + * + *
+   * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+   * is the final element (consistent with RFC 5246). For a self-signed CA, this
+   * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+   * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The pemCaCertificates at the given index. + */ + public java.lang.String getPemCaCertificates(int index) { + return pemCaCertificates_.get(index); + } + /** + * + * + *
+   * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+   * is the final element (consistent with RFC 5246). For a self-signed CA, this
+   * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+   * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pemCaCertificates at the given index. + */ + public com.google.protobuf.ByteString getPemCaCertificatesBytes(int index) { + return pemCaCertificates_.getByteString(index); + } + + public static final int CA_CERTIFICATE_DESCRIPTIONS_FIELD_NUMBER = 12; + private java.util.List + caCertificateDescriptions_; + /** + * + * + *
+   * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+   * and its issuers. Ordered as self-to-root.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getCaCertificateDescriptionsList() { + return caCertificateDescriptions_; + } + /** + * + * + *
+   * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+   * and its issuers. Ordered as self-to-root.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder> + getCaCertificateDescriptionsOrBuilderList() { + return caCertificateDescriptions_; + } + /** + * + * + *
+   * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+   * and its issuers. Ordered as self-to-root.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getCaCertificateDescriptionsCount() { + return caCertificateDescriptions_.size(); + } + /** + * + * + *
+   * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+   * and its issuers. Ordered as self-to-root.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + getCaCertificateDescriptions(int index) { + return caCertificateDescriptions_.get(index); + } + /** + * + * + *
+   * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+   * and its issuers. Ordered as self-to-root.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder + getCaCertificateDescriptionsOrBuilder(int index) { + return caCertificateDescriptions_.get(index); + } + + public static final int GCS_BUCKET_FIELD_NUMBER = 13; + private volatile java.lang.Object gcsBucket_; + /** + * + * + *
+   * Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will
+   * publish content, such as the CA certificate and CRLs. This must be a bucket
+   * name, without any prefixes (such as `gs://`) or suffixes (such as
+   * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
+   * would simply specify `my-bucket`. If not specified, a managed bucket will
+   * be created.
+   * 
+ * + * string gcs_bucket = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The gcsBucket. + */ + @java.lang.Override + public java.lang.String getGcsBucket() { + java.lang.Object ref = gcsBucket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsBucket_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will
+   * publish content, such as the CA certificate and CRLs. This must be a bucket
+   * name, without any prefixes (such as `gs://`) or suffixes (such as
+   * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
+   * would simply specify `my-bucket`. If not specified, a managed bucket will
+   * be created.
+   * 
+ * + * string gcs_bucket = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for gcsBucket. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsBucketBytes() { + java.lang.Object ref = gcsBucket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCESS_URLS_FIELD_NUMBER = 14; + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls accessUrls_; + /** + * + * + *
+   * Output only. URLs for accessing content published by this CA, such as the CA certificate
+   * and CRLs.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the accessUrls field is set. + */ + @java.lang.Override + public boolean hasAccessUrls() { + return accessUrls_ != null; + } + /** + * + * + *
+   * Output only. URLs for accessing content published by this CA, such as the CA certificate
+   * and CRLs.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The accessUrls. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + getAccessUrls() { + return accessUrls_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + .getDefaultInstance() + : accessUrls_; + } + /** + * + * + *
+   * Output only. URLs for accessing content published by this CA, such as the CA certificate
+   * and CRLs.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrlsOrBuilder + getAccessUrlsOrBuilder() { + return getAccessUrls(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 15; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.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 = 16; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int DELETE_TIME_FIELD_NUMBER = 17; + private com.google.protobuf.Timestamp deleteTime_; + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+   * scheduled for deletion.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + @java.lang.Override + public boolean hasDeleteTime() { + return deleteTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+   * scheduled for deletion.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeleteTime() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+   * scheduled for deletion.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + return getDeleteTime(); + } + + public static final int LABELS_FIELD_NUMBER = 18; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (type_ + != com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, type_); + } + if (tier_ + != com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier.TIER_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, tier_); + } + if (config_ != null) { + output.writeMessage(4, getConfig()); + } + if (lifetime_ != null) { + output.writeMessage(5, getLifetime()); + } + if (keySpec_ != null) { + output.writeMessage(6, getKeySpec()); + } + if (certificatePolicy_ != null) { + output.writeMessage(7, getCertificatePolicy()); + } + if (issuingOptions_ != null) { + output.writeMessage(8, getIssuingOptions()); + } + for (int i = 0; i < pemCaCertificates_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, pemCaCertificates_.getRaw(i)); + } + if (state_ + != com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, state_); + } + for (int i = 0; i < caCertificateDescriptions_.size(); i++) { + output.writeMessage(12, caCertificateDescriptions_.get(i)); + } + if (!getGcsBucketBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, gcsBucket_); + } + if (accessUrls_ != null) { + output.writeMessage(14, getAccessUrls()); + } + if (createTime_ != null) { + output.writeMessage(15, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(16, getUpdateTime()); + } + if (deleteTime_ != null) { + output.writeMessage(17, getDeleteTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 18); + if (subordinateConfig_ != null) { + output.writeMessage(19, getSubordinateConfig()); + } + 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 (type_ + != com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (tier_ + != com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier.TIER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, tier_); + } + if (config_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getConfig()); + } + if (lifetime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getLifetime()); + } + if (keySpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getKeySpec()); + } + if (certificatePolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCertificatePolicy()); + } + if (issuingOptions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getIssuingOptions()); + } + { + int dataSize = 0; + for (int i = 0; i < pemCaCertificates_.size(); i++) { + dataSize += computeStringSizeNoTag(pemCaCertificates_.getRaw(i)); + } + size += dataSize; + size += 1 * getPemCaCertificatesList().size(); + } + if (state_ + != com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); + } + for (int i = 0; i < caCertificateDescriptions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, caCertificateDescriptions_.get(i)); + } + if (!getGcsBucketBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, gcsBucket_); + } + if (accessUrls_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getAccessUrls()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getUpdateTime()); + } + if (deleteTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getDeleteTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, labels__); + } + if (subordinateConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getSubordinateConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.CertificateAuthority)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateAuthority other = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority) obj; + + if (!getName().equals(other.getName())) return false; + if (type_ != other.type_) return false; + if (tier_ != other.tier_) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (hasLifetime() != other.hasLifetime()) return false; + if (hasLifetime()) { + if (!getLifetime().equals(other.getLifetime())) return false; + } + if (hasKeySpec() != other.hasKeySpec()) return false; + if (hasKeySpec()) { + if (!getKeySpec().equals(other.getKeySpec())) return false; + } + if (hasCertificatePolicy() != other.hasCertificatePolicy()) return false; + if (hasCertificatePolicy()) { + if (!getCertificatePolicy().equals(other.getCertificatePolicy())) return false; + } + if (hasIssuingOptions() != other.hasIssuingOptions()) return false; + if (hasIssuingOptions()) { + if (!getIssuingOptions().equals(other.getIssuingOptions())) return false; + } + if (hasSubordinateConfig() != other.hasSubordinateConfig()) return false; + if (hasSubordinateConfig()) { + if (!getSubordinateConfig().equals(other.getSubordinateConfig())) return false; + } + if (state_ != other.state_) return false; + if (!getPemCaCertificatesList().equals(other.getPemCaCertificatesList())) return false; + if (!getCaCertificateDescriptionsList().equals(other.getCaCertificateDescriptionsList())) + return false; + if (!getGcsBucket().equals(other.getGcsBucket())) return false; + if (hasAccessUrls() != other.hasAccessUrls()) return false; + if (hasAccessUrls()) { + if (!getAccessUrls().equals(other.getAccessUrls())) 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 (hasDeleteTime() != other.hasDeleteTime()) return false; + if (hasDeleteTime()) { + if (!getDeleteTime().equals(other.getDeleteTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + TIER_FIELD_NUMBER; + hash = (53 * hash) + tier_; + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + if (hasLifetime()) { + hash = (37 * hash) + LIFETIME_FIELD_NUMBER; + hash = (53 * hash) + getLifetime().hashCode(); + } + if (hasKeySpec()) { + hash = (37 * hash) + KEY_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getKeySpec().hashCode(); + } + if (hasCertificatePolicy()) { + hash = (37 * hash) + CERTIFICATE_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getCertificatePolicy().hashCode(); + } + if (hasIssuingOptions()) { + hash = (37 * hash) + ISSUING_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getIssuingOptions().hashCode(); + } + if (hasSubordinateConfig()) { + hash = (37 * hash) + SUBORDINATE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSubordinateConfig().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getPemCaCertificatesCount() > 0) { + hash = (37 * hash) + PEM_CA_CERTIFICATES_FIELD_NUMBER; + hash = (53 * hash) + getPemCaCertificatesList().hashCode(); + } + if (getCaCertificateDescriptionsCount() > 0) { + hash = (37 * hash) + CA_CERTIFICATE_DESCRIPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getCaCertificateDescriptionsList().hashCode(); + } + hash = (37 * hash) + GCS_BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getGcsBucket().hashCode(); + if (hasAccessUrls()) { + hash = (37 * hash) + ACCESS_URLS_FIELD_NUMBER; + hash = (53 * hash) + getAccessUrls().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasDeleteTime()) { + hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeleteTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] represents an individual Certificate Authority.
+   * A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateAuthority} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateAuthority) + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 18: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 18: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.class, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.CertificateAuthority.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCaCertificateDescriptionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + type_ = 0; + + tier_ = 0; + + if (configBuilder_ == null) { + config_ = null; + } else { + config_ = null; + configBuilder_ = null; + } + if (lifetimeBuilder_ == null) { + lifetime_ = null; + } else { + lifetime_ = null; + lifetimeBuilder_ = null; + } + if (keySpecBuilder_ == null) { + keySpec_ = null; + } else { + keySpec_ = null; + keySpecBuilder_ = null; + } + if (certificatePolicyBuilder_ == null) { + certificatePolicy_ = null; + } else { + certificatePolicy_ = null; + certificatePolicyBuilder_ = null; + } + if (issuingOptionsBuilder_ == null) { + issuingOptions_ = null; + } else { + issuingOptions_ = null; + issuingOptionsBuilder_ = null; + } + if (subordinateConfigBuilder_ == null) { + subordinateConfig_ = null; + } else { + subordinateConfig_ = null; + subordinateConfigBuilder_ = null; + } + state_ = 0; + + pemCaCertificates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (caCertificateDescriptionsBuilder_ == null) { + caCertificateDescriptions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + caCertificateDescriptionsBuilder_.clear(); + } + gcsBucket_ = ""; + + if (accessUrlsBuilder_ == null) { + accessUrls_ = null; + } else { + accessUrls_ = null; + accessUrlsBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (deleteTimeBuilder_ == null) { + deleteTime_ = null; + } else { + deleteTime_ = null; + deleteTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateAuthority.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority build() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority result = + new com.google.cloud.security.privateca.v1beta1.CertificateAuthority(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.type_ = type_; + result.tier_ = tier_; + if (configBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = configBuilder_.build(); + } + if (lifetimeBuilder_ == null) { + result.lifetime_ = lifetime_; + } else { + result.lifetime_ = lifetimeBuilder_.build(); + } + if (keySpecBuilder_ == null) { + result.keySpec_ = keySpec_; + } else { + result.keySpec_ = keySpecBuilder_.build(); + } + if (certificatePolicyBuilder_ == null) { + result.certificatePolicy_ = certificatePolicy_; + } else { + result.certificatePolicy_ = certificatePolicyBuilder_.build(); + } + if (issuingOptionsBuilder_ == null) { + result.issuingOptions_ = issuingOptions_; + } else { + result.issuingOptions_ = issuingOptionsBuilder_.build(); + } + if (subordinateConfigBuilder_ == null) { + result.subordinateConfig_ = subordinateConfig_; + } else { + result.subordinateConfig_ = subordinateConfigBuilder_.build(); + } + result.state_ = state_; + if (((bitField0_ & 0x00000001) != 0)) { + pemCaCertificates_ = pemCaCertificates_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pemCaCertificates_ = pemCaCertificates_; + if (caCertificateDescriptionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + caCertificateDescriptions_ = + java.util.Collections.unmodifiableList(caCertificateDescriptions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.caCertificateDescriptions_ = caCertificateDescriptions_; + } else { + result.caCertificateDescriptions_ = caCertificateDescriptionsBuilder_.build(); + } + result.gcsBucket_ = gcsBucket_; + if (accessUrlsBuilder_ == null) { + result.accessUrls_ = accessUrls_; + } else { + result.accessUrls_ = accessUrlsBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (deleteTimeBuilder_ == null) { + result.deleteTime_ = deleteTime_; + } else { + result.deleteTime_ = deleteTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.CertificateAuthority) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.CertificateAuthority) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateAuthority.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.tier_ != 0) { + setTierValue(other.getTierValue()); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (other.hasLifetime()) { + mergeLifetime(other.getLifetime()); + } + if (other.hasKeySpec()) { + mergeKeySpec(other.getKeySpec()); + } + if (other.hasCertificatePolicy()) { + mergeCertificatePolicy(other.getCertificatePolicy()); + } + if (other.hasIssuingOptions()) { + mergeIssuingOptions(other.getIssuingOptions()); + } + if (other.hasSubordinateConfig()) { + mergeSubordinateConfig(other.getSubordinateConfig()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.pemCaCertificates_.isEmpty()) { + if (pemCaCertificates_.isEmpty()) { + pemCaCertificates_ = other.pemCaCertificates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePemCaCertificatesIsMutable(); + pemCaCertificates_.addAll(other.pemCaCertificates_); + } + onChanged(); + } + if (caCertificateDescriptionsBuilder_ == null) { + if (!other.caCertificateDescriptions_.isEmpty()) { + if (caCertificateDescriptions_.isEmpty()) { + caCertificateDescriptions_ = other.caCertificateDescriptions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCaCertificateDescriptionsIsMutable(); + caCertificateDescriptions_.addAll(other.caCertificateDescriptions_); + } + onChanged(); + } + } else { + if (!other.caCertificateDescriptions_.isEmpty()) { + if (caCertificateDescriptionsBuilder_.isEmpty()) { + caCertificateDescriptionsBuilder_.dispose(); + caCertificateDescriptionsBuilder_ = null; + caCertificateDescriptions_ = other.caCertificateDescriptions_; + bitField0_ = (bitField0_ & ~0x00000002); + caCertificateDescriptionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCaCertificateDescriptionsFieldBuilder() + : null; + } else { + caCertificateDescriptionsBuilder_.addAllMessages(other.caCertificateDescriptions_); + } + } + } + if (!other.getGcsBucket().isEmpty()) { + gcsBucket_ = other.gcsBucket_; + onChanged(); + } + if (other.hasAccessUrls()) { + mergeAccessUrls(other.getAccessUrls()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDeleteTime()) { + mergeDeleteTime(other.getDeleteTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateAuthority) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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; + } + /** + * + * + *
+     * Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type result = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.valueOf(type_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private int tier_ = 0; + /** + * + * + *
+     * Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier tier = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for tier. + */ + @java.lang.Override + public int getTierValue() { + return tier_; + } + /** + * + * + *
+     * Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier tier = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for tier to set. + * @return This builder for chaining. + */ + public Builder setTierValue(int value) { + + tier_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier tier = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The tier. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier getTier() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier result = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier.valueOf(tier_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier tier = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The tier to set. + * @return This builder for chaining. + */ + public Builder setTier( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier value) { + if (value == null) { + throw new NullPointerException(); + } + + tier_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier tier = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearTier() { + + tier_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateConfig, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder> + configBuilder_; + /** + * + * + *
+     * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return configBuilder_ != null || config_ != null; + } + /** + * + * + *
+     * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The config. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateConfig.getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setConfig(com.google.cloud.security.privateca.v1beta1.CertificateConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setConfig( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeConfig( + com.google.cloud.security.privateca.v1beta1.CertificateConfig value) { + if (configBuilder_ == null) { + if (config_ != null) { + config_ = + com.google.cloud.security.privateca.v1beta1.CertificateConfig.newBuilder(config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + configBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + config_ = null; + onChanged(); + } else { + config_ = null; + configBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder + getConfigBuilder() { + + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder + getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateConfig.getDefaultInstance() + : config_; + } + } + /** + * + * + *
+     * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateConfig, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateConfig, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + private com.google.protobuf.Duration lifetime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + lifetimeBuilder_; + /** + * + * + *
+     * Required. The desired lifetime of the CA certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the lifetime field is set. + */ + public boolean hasLifetime() { + return lifetimeBuilder_ != null || lifetime_ != null; + } + /** + * + * + *
+     * Required. The desired lifetime of the CA certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The lifetime. + */ + public com.google.protobuf.Duration getLifetime() { + if (lifetimeBuilder_ == null) { + return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_; + } else { + return lifetimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The desired lifetime of the CA certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLifetime(com.google.protobuf.Duration value) { + if (lifetimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lifetime_ = value; + onChanged(); + } else { + lifetimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired lifetime of the CA certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLifetime(com.google.protobuf.Duration.Builder builderForValue) { + if (lifetimeBuilder_ == null) { + lifetime_ = builderForValue.build(); + onChanged(); + } else { + lifetimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The desired lifetime of the CA certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLifetime(com.google.protobuf.Duration value) { + if (lifetimeBuilder_ == null) { + if (lifetime_ != null) { + lifetime_ = + com.google.protobuf.Duration.newBuilder(lifetime_).mergeFrom(value).buildPartial(); + } else { + lifetime_ = value; + } + onChanged(); + } else { + lifetimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired lifetime of the CA certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLifetime() { + if (lifetimeBuilder_ == null) { + lifetime_ = null; + onChanged(); + } else { + lifetime_ = null; + lifetimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The desired lifetime of the CA certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getLifetimeBuilder() { + + onChanged(); + return getLifetimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The desired lifetime of the CA certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getLifetimeOrBuilder() { + if (lifetimeBuilder_ != null) { + return lifetimeBuilder_.getMessageOrBuilder(); + } else { + return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_; + } + } + /** + * + * + *
+     * Required. The desired lifetime of the CA certificate. Used to create the
+     * "not_before_time" and "not_after_time" fields inside an X.509
+     * certificate.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getLifetimeFieldBuilder() { + if (lifetimeBuilder_ == null) { + lifetimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getLifetime(), getParentForChildren(), isClean()); + lifetime_ = null; + } + return lifetimeBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + keySpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .KeyVersionSpecOrBuilder> + keySpecBuilder_; + /** + * + * + *
+     * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+     * is also used to sign the self-signed CA certificate. Otherwise, it
+     * is used to sign a CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the keySpec field is set. + */ + public boolean hasKeySpec() { + return keySpecBuilder_ != null || keySpec_ != null; + } + /** + * + * + *
+     * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+     * is also used to sign the self-signed CA certificate. Otherwise, it
+     * is used to sign a CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The keySpec. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + getKeySpec() { + if (keySpecBuilder_ == null) { + return keySpec_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .getDefaultInstance() + : keySpec_; + } else { + return keySpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+     * is also used to sign the self-signed CA certificate. Otherwise, it
+     * is used to sign a CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setKeySpec( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec value) { + if (keySpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keySpec_ = value; + onChanged(); + } else { + keySpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+     * is also used to sign the self-signed CA certificate. Otherwise, it
+     * is used to sign a CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setKeySpec( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.Builder + builderForValue) { + if (keySpecBuilder_ == null) { + keySpec_ = builderForValue.build(); + onChanged(); + } else { + keySpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+     * is also used to sign the self-signed CA certificate. Otherwise, it
+     * is used to sign a CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeKeySpec( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec value) { + if (keySpecBuilder_ == null) { + if (keySpec_ != null) { + keySpec_ = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .newBuilder(keySpec_) + .mergeFrom(value) + .buildPartial(); + } else { + keySpec_ = value; + } + onChanged(); + } else { + keySpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+     * is also used to sign the self-signed CA certificate. Otherwise, it
+     * is used to sign a CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearKeySpec() { + if (keySpecBuilder_ == null) { + keySpec_ = null; + onChanged(); + } else { + keySpec_ = null; + keySpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+     * is also used to sign the self-signed CA certificate. Otherwise, it
+     * is used to sign a CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.Builder + getKeySpecBuilder() { + + onChanged(); + return getKeySpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+     * is also used to sign the self-signed CA certificate. Otherwise, it
+     * is used to sign a CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpecOrBuilder + getKeySpecOrBuilder() { + if (keySpecBuilder_ != null) { + return keySpecBuilder_.getMessageOrBuilder(); + } else { + return keySpec_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .getDefaultInstance() + : keySpec_; + } + } + /** + * + * + *
+     * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+     * is also used to sign the self-signed CA certificate. Otherwise, it
+     * is used to sign a CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .KeyVersionSpecOrBuilder> + getKeySpecFieldBuilder() { + if (keySpecBuilder_ == null) { + keySpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + .Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .KeyVersionSpecOrBuilder>(getKeySpec(), getParentForChildren(), isClean()); + keySpec_ = null; + } + return keySpecBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + certificatePolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicyOrBuilder> + certificatePolicyBuilder_; + /** + * + * + *
+     * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the certificatePolicy field is set. + */ + public boolean hasCertificatePolicy() { + return certificatePolicyBuilder_ != null || certificatePolicy_ != null; + } + /** + * + * + *
+     * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The certificatePolicy. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy + getCertificatePolicy() { + if (certificatePolicyBuilder_ == null) { + return certificatePolicy_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.getDefaultInstance() + : certificatePolicy_; + } else { + return certificatePolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCertificatePolicy( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + value) { + if (certificatePolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificatePolicy_ = value; + onChanged(); + } else { + certificatePolicyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCertificatePolicy( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + .Builder + builderForValue) { + if (certificatePolicyBuilder_ == null) { + certificatePolicy_ = builderForValue.build(); + onChanged(); + } else { + certificatePolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCertificatePolicy( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + value) { + if (certificatePolicyBuilder_ == null) { + if (certificatePolicy_ != null) { + certificatePolicy_ = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.newBuilder(certificatePolicy_) + .mergeFrom(value) + .buildPartial(); + } else { + certificatePolicy_ = value; + } + onChanged(); + } else { + certificatePolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCertificatePolicy() { + if (certificatePolicyBuilder_ == null) { + certificatePolicy_ = null; + onChanged(); + } else { + certificatePolicy_ = null; + certificatePolicyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.Builder + getCertificatePolicyBuilder() { + + onChanged(); + return getCertificatePolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicyOrBuilder + getCertificatePolicyOrBuilder() { + if (certificatePolicyBuilder_ != null) { + return certificatePolicyBuilder_.getMessageOrBuilder(); + } else { + return certificatePolicy_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.getDefaultInstance() + : certificatePolicy_; + } + } + /** + * + * + *
+     * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicyOrBuilder> + getCertificatePolicyFieldBuilder() { + if (certificatePolicyBuilder_ == null) { + certificatePolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicy.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicyOrBuilder>( + getCertificatePolicy(), getParentForChildren(), isClean()); + certificatePolicy_ = null; + } + return certificatePolicyBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + issuingOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .IssuingOptionsOrBuilder> + issuingOptionsBuilder_; + /** + * + * + *
+     * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+     * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the issuingOptions field is set. + */ + public boolean hasIssuingOptions() { + return issuingOptionsBuilder_ != null || issuingOptions_ != null; + } + /** + * + * + *
+     * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+     * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The issuingOptions. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + getIssuingOptions() { + if (issuingOptionsBuilder_ == null) { + return issuingOptions_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + .getDefaultInstance() + : issuingOptions_; + } else { + return issuingOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+     * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIssuingOptions( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions value) { + if (issuingOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + issuingOptions_ = value; + onChanged(); + } else { + issuingOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+     * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIssuingOptions( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.Builder + builderForValue) { + if (issuingOptionsBuilder_ == null) { + issuingOptions_ = builderForValue.build(); + onChanged(); + } else { + issuingOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+     * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeIssuingOptions( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions value) { + if (issuingOptionsBuilder_ == null) { + if (issuingOptions_ != null) { + issuingOptions_ = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + .newBuilder(issuingOptions_) + .mergeFrom(value) + .buildPartial(); + } else { + issuingOptions_ = value; + } + onChanged(); + } else { + issuingOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+     * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIssuingOptions() { + if (issuingOptionsBuilder_ == null) { + issuingOptions_ = null; + onChanged(); + } else { + issuingOptions_ = null; + issuingOptionsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+     * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.Builder + getIssuingOptionsBuilder() { + + onChanged(); + return getIssuingOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+     * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptionsOrBuilder + getIssuingOptionsOrBuilder() { + if (issuingOptionsBuilder_ != null) { + return issuingOptionsBuilder_.getMessageOrBuilder(); + } else { + return issuingOptions_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + .getDefaultInstance() + : issuingOptions_; + } + } + /** + * + * + *
+     * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+     * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .IssuingOptionsOrBuilder> + getIssuingOptionsFieldBuilder() { + if (issuingOptionsBuilder_ == null) { + issuingOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + .Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .IssuingOptionsOrBuilder>( + getIssuingOptions(), getParentForChildren(), isClean()); + issuingOptions_ = null; + } + return issuingOptionsBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.SubordinateConfig subordinateConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubordinateConfig, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder> + subordinateConfigBuilder_; + /** + * + * + *
+     * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+     * with the subordinate configuration, which describes its issuers. This may
+     * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subordinateConfig field is set. + */ + public boolean hasSubordinateConfig() { + return subordinateConfigBuilder_ != null || subordinateConfig_ != null; + } + /** + * + * + *
+     * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+     * with the subordinate configuration, which describes its issuers. This may
+     * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subordinateConfig. + */ + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig getSubordinateConfig() { + if (subordinateConfigBuilder_ == null) { + return subordinateConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.SubordinateConfig.getDefaultInstance() + : subordinateConfig_; + } else { + return subordinateConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+     * with the subordinate configuration, which describes its issuers. This may
+     * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSubordinateConfig( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig value) { + if (subordinateConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subordinateConfig_ = value; + onChanged(); + } else { + subordinateConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+     * with the subordinate configuration, which describes its issuers. This may
+     * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSubordinateConfig( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder builderForValue) { + if (subordinateConfigBuilder_ == null) { + subordinateConfig_ = builderForValue.build(); + onChanged(); + } else { + subordinateConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+     * with the subordinate configuration, which describes its issuers. This may
+     * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSubordinateConfig( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig value) { + if (subordinateConfigBuilder_ == null) { + if (subordinateConfig_ != null) { + subordinateConfig_ = + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.newBuilder( + subordinateConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + subordinateConfig_ = value; + } + onChanged(); + } else { + subordinateConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+     * with the subordinate configuration, which describes its issuers. This may
+     * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSubordinateConfig() { + if (subordinateConfigBuilder_ == null) { + subordinateConfig_ = null; + onChanged(); + } else { + subordinateConfig_ = null; + subordinateConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+     * with the subordinate configuration, which describes its issuers. This may
+     * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder + getSubordinateConfigBuilder() { + + onChanged(); + return getSubordinateConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+     * with the subordinate configuration, which describes its issuers. This may
+     * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder + getSubordinateConfigOrBuilder() { + if (subordinateConfigBuilder_ != null) { + return subordinateConfigBuilder_.getMessageOrBuilder(); + } else { + return subordinateConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.SubordinateConfig.getDefaultInstance() + : subordinateConfig_; + } + } + /** + * + * + *
+     * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+     * with the subordinate configuration, which describes its issuers. This may
+     * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubordinateConfig, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder> + getSubordinateConfigFieldBuilder() { + if (subordinateConfigBuilder_ == null) { + subordinateConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubordinateConfig, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder, + com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder>( + getSubordinateConfig(), getParentForChildren(), isClean()); + subordinateConfig_ = null; + } + return subordinateConfigBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State result = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State.valueOf(state_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList pemCaCertificates_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensurePemCaCertificatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pemCaCertificates_ = new com.google.protobuf.LazyStringArrayList(pemCaCertificates_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+     * is the final element (consistent with RFC 5246). For a self-signed CA, this
+     * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+     * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the pemCaCertificates. + */ + public com.google.protobuf.ProtocolStringList getPemCaCertificatesList() { + return pemCaCertificates_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+     * is the final element (consistent with RFC 5246). For a self-signed CA, this
+     * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+     * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of pemCaCertificates. + */ + public int getPemCaCertificatesCount() { + return pemCaCertificates_.size(); + } + /** + * + * + *
+     * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+     * is the final element (consistent with RFC 5246). For a self-signed CA, this
+     * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+     * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The pemCaCertificates at the given index. + */ + public java.lang.String getPemCaCertificates(int index) { + return pemCaCertificates_.get(index); + } + /** + * + * + *
+     * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+     * is the final element (consistent with RFC 5246). For a self-signed CA, this
+     * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+     * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pemCaCertificates at the given index. + */ + public com.google.protobuf.ByteString getPemCaCertificatesBytes(int index) { + return pemCaCertificates_.getByteString(index); + } + /** + * + * + *
+     * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+     * is the final element (consistent with RFC 5246). For a self-signed CA, this
+     * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+     * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The pemCaCertificates to set. + * @return This builder for chaining. + */ + public Builder setPemCaCertificates(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePemCaCertificatesIsMutable(); + pemCaCertificates_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+     * is the final element (consistent with RFC 5246). For a self-signed CA, this
+     * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+     * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The pemCaCertificates to add. + * @return This builder for chaining. + */ + public Builder addPemCaCertificates(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePemCaCertificatesIsMutable(); + pemCaCertificates_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+     * is the final element (consistent with RFC 5246). For a self-signed CA, this
+     * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+     * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The pemCaCertificates to add. + * @return This builder for chaining. + */ + public Builder addAllPemCaCertificates(java.lang.Iterable values) { + ensurePemCaCertificatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pemCaCertificates_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+     * is the final element (consistent with RFC 5246). For a self-signed CA, this
+     * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+     * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPemCaCertificates() { + pemCaCertificates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+     * is the final element (consistent with RFC 5246). For a self-signed CA, this
+     * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+     * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the pemCaCertificates to add. + * @return This builder for chaining. + */ + public Builder addPemCaCertificatesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePemCaCertificatesIsMutable(); + pemCaCertificates_.add(value); + onChanged(); + return this; + } + + private java.util.List + caCertificateDescriptions_ = java.util.Collections.emptyList(); + + private void ensureCaCertificateDescriptionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + caCertificateDescriptions_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.CertificateDescription>( + caCertificateDescriptions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder> + caCertificateDescriptionsBuilder_; + + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getCaCertificateDescriptionsList() { + if (caCertificateDescriptionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(caCertificateDescriptions_); + } else { + return caCertificateDescriptionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getCaCertificateDescriptionsCount() { + if (caCertificateDescriptionsBuilder_ == null) { + return caCertificateDescriptions_.size(); + } else { + return caCertificateDescriptionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + getCaCertificateDescriptions(int index) { + if (caCertificateDescriptionsBuilder_ == null) { + return caCertificateDescriptions_.get(index); + } else { + return caCertificateDescriptionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCaCertificateDescriptions( + int index, com.google.cloud.security.privateca.v1beta1.CertificateDescription value) { + if (caCertificateDescriptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertificateDescriptionsIsMutable(); + caCertificateDescriptions_.set(index, value); + onChanged(); + } else { + caCertificateDescriptionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCaCertificateDescriptions( + int index, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder + builderForValue) { + if (caCertificateDescriptionsBuilder_ == null) { + ensureCaCertificateDescriptionsIsMutable(); + caCertificateDescriptions_.set(index, builderForValue.build()); + onChanged(); + } else { + caCertificateDescriptionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addCaCertificateDescriptions( + com.google.cloud.security.privateca.v1beta1.CertificateDescription value) { + if (caCertificateDescriptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertificateDescriptionsIsMutable(); + caCertificateDescriptions_.add(value); + onChanged(); + } else { + caCertificateDescriptionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addCaCertificateDescriptions( + int index, com.google.cloud.security.privateca.v1beta1.CertificateDescription value) { + if (caCertificateDescriptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertificateDescriptionsIsMutable(); + caCertificateDescriptions_.add(index, value); + onChanged(); + } else { + caCertificateDescriptionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addCaCertificateDescriptions( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder + builderForValue) { + if (caCertificateDescriptionsBuilder_ == null) { + ensureCaCertificateDescriptionsIsMutable(); + caCertificateDescriptions_.add(builderForValue.build()); + onChanged(); + } else { + caCertificateDescriptionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addCaCertificateDescriptions( + int index, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder + builderForValue) { + if (caCertificateDescriptionsBuilder_ == null) { + ensureCaCertificateDescriptionsIsMutable(); + caCertificateDescriptions_.add(index, builderForValue.build()); + onChanged(); + } else { + caCertificateDescriptionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllCaCertificateDescriptions( + java.lang.Iterable< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateDescription> + values) { + if (caCertificateDescriptionsBuilder_ == null) { + ensureCaCertificateDescriptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, caCertificateDescriptions_); + onChanged(); + } else { + caCertificateDescriptionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCaCertificateDescriptions() { + if (caCertificateDescriptionsBuilder_ == null) { + caCertificateDescriptions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + caCertificateDescriptionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeCaCertificateDescriptions(int index) { + if (caCertificateDescriptionsBuilder_ == null) { + ensureCaCertificateDescriptionsIsMutable(); + caCertificateDescriptions_.remove(index); + onChanged(); + } else { + caCertificateDescriptionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder + getCaCertificateDescriptionsBuilder(int index) { + return getCaCertificateDescriptionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder + getCaCertificateDescriptionsOrBuilder(int index) { + if (caCertificateDescriptionsBuilder_ == null) { + return caCertificateDescriptions_.get(index); + } else { + return caCertificateDescriptionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder> + getCaCertificateDescriptionsOrBuilderList() { + if (caCertificateDescriptionsBuilder_ != null) { + return caCertificateDescriptionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(caCertificateDescriptions_); + } + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder + addCaCertificateDescriptionsBuilder() { + return getCaCertificateDescriptionsFieldBuilder() + .addBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder + addCaCertificateDescriptionsBuilder(int index) { + return getCaCertificateDescriptionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+     * and its issuers. Ordered as self-to-root.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder> + getCaCertificateDescriptionsBuilderList() { + return getCaCertificateDescriptionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder> + getCaCertificateDescriptionsFieldBuilder() { + if (caCertificateDescriptionsBuilder_ == null) { + caCertificateDescriptionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder>( + caCertificateDescriptions_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + caCertificateDescriptions_ = null; + } + return caCertificateDescriptionsBuilder_; + } + + private java.lang.Object gcsBucket_ = ""; + /** + * + * + *
+     * Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will
+     * publish content, such as the CA certificate and CRLs. This must be a bucket
+     * name, without any prefixes (such as `gs://`) or suffixes (such as
+     * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
+     * would simply specify `my-bucket`. If not specified, a managed bucket will
+     * be created.
+     * 
+ * + * string gcs_bucket = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The gcsBucket. + */ + public java.lang.String getGcsBucket() { + java.lang.Object ref = gcsBucket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsBucket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will
+     * publish content, such as the CA certificate and CRLs. This must be a bucket
+     * name, without any prefixes (such as `gs://`) or suffixes (such as
+     * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
+     * would simply specify `my-bucket`. If not specified, a managed bucket will
+     * be created.
+     * 
+ * + * string gcs_bucket = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for gcsBucket. + */ + public com.google.protobuf.ByteString getGcsBucketBytes() { + java.lang.Object ref = gcsBucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will
+     * publish content, such as the CA certificate and CRLs. This must be a bucket
+     * name, without any prefixes (such as `gs://`) or suffixes (such as
+     * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
+     * would simply specify `my-bucket`. If not specified, a managed bucket will
+     * be created.
+     * 
+ * + * string gcs_bucket = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The gcsBucket to set. + * @return This builder for chaining. + */ + public Builder setGcsBucket(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsBucket_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will
+     * publish content, such as the CA certificate and CRLs. This must be a bucket
+     * name, without any prefixes (such as `gs://`) or suffixes (such as
+     * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
+     * would simply specify `my-bucket`. If not specified, a managed bucket will
+     * be created.
+     * 
+ * + * string gcs_bucket = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearGcsBucket() { + + gcsBucket_ = getDefaultInstance().getGcsBucket(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will
+     * publish content, such as the CA certificate and CRLs. This must be a bucket
+     * name, without any prefixes (such as `gs://`) or suffixes (such as
+     * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
+     * would simply specify `my-bucket`. If not specified, a managed bucket will
+     * be created.
+     * 
+ * + * string gcs_bucket = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for gcsBucket to set. + * @return This builder for chaining. + */ + public Builder setGcsBucketBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsBucket_ = value; + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls accessUrls_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrlsOrBuilder> + accessUrlsBuilder_; + /** + * + * + *
+     * Output only. URLs for accessing content published by this CA, such as the CA certificate
+     * and CRLs.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the accessUrls field is set. + */ + public boolean hasAccessUrls() { + return accessUrlsBuilder_ != null || accessUrls_ != null; + } + /** + * + * + *
+     * Output only. URLs for accessing content published by this CA, such as the CA certificate
+     * and CRLs.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The accessUrls. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + getAccessUrls() { + if (accessUrlsBuilder_ == null) { + return accessUrls_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + .getDefaultInstance() + : accessUrls_; + } else { + return accessUrlsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. URLs for accessing content published by this CA, such as the CA certificate
+     * and CRLs.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAccessUrls( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls value) { + if (accessUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessUrls_ = value; + onChanged(); + } else { + accessUrlsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. URLs for accessing content published by this CA, such as the CA certificate
+     * and CRLs.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAccessUrls( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.Builder + builderForValue) { + if (accessUrlsBuilder_ == null) { + accessUrls_ = builderForValue.build(); + onChanged(); + } else { + accessUrlsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. URLs for accessing content published by this CA, such as the CA certificate
+     * and CRLs.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAccessUrls( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls value) { + if (accessUrlsBuilder_ == null) { + if (accessUrls_ != null) { + accessUrls_ = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + .newBuilder(accessUrls_) + .mergeFrom(value) + .buildPartial(); + } else { + accessUrls_ = value; + } + onChanged(); + } else { + accessUrlsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. URLs for accessing content published by this CA, such as the CA certificate
+     * and CRLs.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAccessUrls() { + if (accessUrlsBuilder_ == null) { + accessUrls_ = null; + onChanged(); + } else { + accessUrls_ = null; + accessUrlsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. URLs for accessing content published by this CA, such as the CA certificate
+     * and CRLs.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.Builder + getAccessUrlsBuilder() { + + onChanged(); + return getAccessUrlsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. URLs for accessing content published by this CA, such as the CA certificate
+     * and CRLs.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrlsOrBuilder + getAccessUrlsOrBuilder() { + if (accessUrlsBuilder_ != null) { + return accessUrlsBuilder_.getMessageOrBuilder(); + } else { + return accessUrls_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + .getDefaultInstance() + : accessUrls_; + } + } + /** + * + * + *
+     * Output only. URLs for accessing content published by this CA, such as the CA certificate
+     * and CRLs.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrlsOrBuilder> + getAccessUrlsFieldBuilder() { + if (accessUrlsBuilder_ == null) { + accessUrlsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .AccessUrlsOrBuilder>(getAccessUrls(), getParentForChildren(), isClean()); + accessUrls_ = null; + } + return accessUrlsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp deleteTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deleteTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+     * scheduled for deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + public boolean hasDeleteTime() { + return deleteTimeBuilder_ != null || deleteTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+     * scheduled for deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + public com.google.protobuf.Timestamp getDeleteTime() { + if (deleteTimeBuilder_ == null) { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } else { + return deleteTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+     * scheduled for deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteTime_ = value; + onChanged(); + } else { + deleteTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+     * scheduled for deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deleteTimeBuilder_ == null) { + deleteTime_ = builderForValue.build(); + onChanged(); + } else { + deleteTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+     * scheduled for deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (deleteTime_ != null) { + deleteTime_ = + com.google.protobuf.Timestamp.newBuilder(deleteTime_).mergeFrom(value).buildPartial(); + } else { + deleteTime_ = value; + } + onChanged(); + } else { + deleteTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+     * scheduled for deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeleteTime() { + if (deleteTimeBuilder_ == null) { + deleteTime_ = null; + onChanged(); + } else { + deleteTime_ = null; + deleteTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+     * scheduled for deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { + + onChanged(); + return getDeleteTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+     * scheduled for deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + if (deleteTimeBuilder_ != null) { + return deleteTimeBuilder_.getMessageOrBuilder(); + } else { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+     * scheduled for deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDeleteTimeFieldBuilder() { + if (deleteTimeBuilder_ == null) { + deleteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeleteTime(), getParentForChildren(), isClean()); + deleteTime_ = null; + } + return deleteTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateAuthority) + private static final com.google.cloud.security.privateca.v1beta1.CertificateAuthority + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.CertificateAuthority(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateAuthority + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateAuthority parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CertificateAuthority(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityName.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityName.java new file mode 100644 index 00000000..c2f2b946 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityName.java @@ -0,0 +1,217 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class CertificateAuthorityName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String certificateAuthority; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificateAuthority() { + return certificateAuthority; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private CertificateAuthorityName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + certificateAuthority = Preconditions.checkNotNull(builder.getCertificateAuthority()); + } + + public static CertificateAuthorityName of( + String project, String location, String certificateAuthority) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificateAuthority(certificateAuthority) + .build(); + } + + public static String format(String project, String location, String certificateAuthority) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificateAuthority(certificateAuthority) + .build() + .toString(); + } + + public static CertificateAuthorityName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "CertificateAuthorityName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), matchMap.get("location"), matchMap.get("certificate_authority")); + } + + 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 (CertificateAuthorityName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("certificateAuthority", certificateAuthority); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "location", location, "certificate_authority", certificateAuthority); + } + + /** Builder for CertificateAuthorityName. */ + public static class Builder { + + private String project; + private String location; + private String certificateAuthority; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificateAuthority() { + return certificateAuthority; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCertificateAuthority(String certificateAuthority) { + this.certificateAuthority = certificateAuthority; + return this; + } + + private Builder() {} + + private Builder(CertificateAuthorityName certificateAuthorityName) { + project = certificateAuthorityName.project; + location = certificateAuthorityName.location; + certificateAuthority = certificateAuthorityName.certificateAuthority; + } + + public CertificateAuthorityName build() { + return new CertificateAuthorityName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof CertificateAuthorityName) { + CertificateAuthorityName that = (CertificateAuthorityName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.certificateAuthority.equals(that.certificateAuthority)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= certificateAuthority.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityOrBuilder.java new file mode 100644 index 00000000..ad7c60a8 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityOrBuilder.java @@ -0,0 +1,802 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface CertificateAuthorityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateAuthority) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The type. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type getType(); + + /** + * + * + *
+   * Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier tier = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for tier. + */ + int getTierValue(); + /** + * + * + *
+   * Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier tier = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The tier. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier getTier(); + + /** + * + * + *
+   * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The config. + */ + com.google.cloud.security.privateca.v1beta1.CertificateConfig getConfig(); + /** + * + * + *
+   * Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * Required. The desired lifetime of the CA certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate.
+   * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the lifetime field is set. + */ + boolean hasLifetime(); + /** + * + * + *
+   * Required. The desired lifetime of the CA certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate.
+   * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lifetime. + */ + com.google.protobuf.Duration getLifetime(); + /** + * + * + *
+   * Required. The desired lifetime of the CA certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate.
+   * 
+ * + * .google.protobuf.Duration lifetime = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.DurationOrBuilder getLifetimeOrBuilder(); + + /** + * + * + *
+   * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+   * is also used to sign the self-signed CA certificate. Otherwise, it
+   * is used to sign a CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the keySpec field is set. + */ + boolean hasKeySpec(); + /** + * + * + *
+   * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+   * is also used to sign the self-signed CA certificate. Otherwise, it
+   * is used to sign a CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The keySpec. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec getKeySpec(); + /** + * + * + *
+   * Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
+   * is also used to sign the self-signed CA certificate. Otherwise, it
+   * is used to sign a CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec key_spec = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpecOrBuilder + getKeySpecOrBuilder(); + + /** + * + * + *
+   * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the certificatePolicy field is set. + */ + boolean hasCertificatePolicy(); + /** + * + * + *
+   * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The certificatePolicy. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + getCertificatePolicy(); + /** + * + * + *
+   * Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy certificate_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .CertificateAuthorityPolicyOrBuilder + getCertificatePolicyOrBuilder(); + + /** + * + * + *
+   * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+   * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the issuingOptions field is set. + */ + boolean hasIssuingOptions(); + /** + * + * + *
+   * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+   * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The issuingOptions. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + getIssuingOptions(); + /** + * + * + *
+   * Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
+   * from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions issuing_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptionsOrBuilder + getIssuingOptionsOrBuilder(); + + /** + * + * + *
+   * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+   * with the subordinate configuration, which describes its issuers. This may
+   * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subordinateConfig field is set. + */ + boolean hasSubordinateConfig(); + /** + * + * + *
+   * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+   * with the subordinate configuration, which describes its issuers. This may
+   * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subordinateConfig. + */ + com.google.cloud.security.privateca.v1beta1.SubordinateConfig getSubordinateConfig(); + /** + * + * + *
+   * Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
+   * with the subordinate configuration, which describes its issuers. This may
+   * be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig subordinate_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder + getSubordinateConfigOrBuilder(); + + /** + * + * + *
+   * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.State getState(); + + /** + * + * + *
+   * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+   * is the final element (consistent with RFC 5246). For a self-signed CA, this
+   * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+   * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the pemCaCertificates. + */ + java.util.List getPemCaCertificatesList(); + /** + * + * + *
+   * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+   * is the final element (consistent with RFC 5246). For a self-signed CA, this
+   * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+   * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of pemCaCertificates. + */ + int getPemCaCertificatesCount(); + /** + * + * + *
+   * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+   * is the final element (consistent with RFC 5246). For a self-signed CA, this
+   * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+   * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The pemCaCertificates at the given index. + */ + java.lang.String getPemCaCertificates(int index); + /** + * + * + *
+   * Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
+   * is the final element (consistent with RFC 5246). For a self-signed CA, this
+   * will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
+   * 
+ * + * repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pemCaCertificates at the given index. + */ + com.google.protobuf.ByteString getPemCaCertificatesBytes(int index); + + /** + * + * + *
+   * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+   * and its issuers. Ordered as self-to-root.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getCaCertificateDescriptionsList(); + /** + * + * + *
+   * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+   * and its issuers. Ordered as self-to-root.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescription getCaCertificateDescriptions( + int index); + /** + * + * + *
+   * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+   * and its issuers. Ordered as self-to-root.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getCaCertificateDescriptionsCount(); + /** + * + * + *
+   * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+   * and its issuers. Ordered as self-to-root.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder> + getCaCertificateDescriptionsOrBuilderList(); + /** + * + * + *
+   * Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
+   * and its issuers. Ordered as self-to-root.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateDescription ca_certificate_descriptions = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder + getCaCertificateDescriptionsOrBuilder(int index); + + /** + * + * + *
+   * Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will
+   * publish content, such as the CA certificate and CRLs. This must be a bucket
+   * name, without any prefixes (such as `gs://`) or suffixes (such as
+   * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
+   * would simply specify `my-bucket`. If not specified, a managed bucket will
+   * be created.
+   * 
+ * + * string gcs_bucket = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The gcsBucket. + */ + java.lang.String getGcsBucket(); + /** + * + * + *
+   * Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will
+   * publish content, such as the CA certificate and CRLs. This must be a bucket
+   * name, without any prefixes (such as `gs://`) or suffixes (such as
+   * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
+   * would simply specify `my-bucket`. If not specified, a managed bucket will
+   * be created.
+   * 
+ * + * string gcs_bucket = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for gcsBucket. + */ + com.google.protobuf.ByteString getGcsBucketBytes(); + + /** + * + * + *
+   * Output only. URLs for accessing content published by this CA, such as the CA certificate
+   * and CRLs.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the accessUrls field is set. + */ + boolean hasAccessUrls(); + /** + * + * + *
+   * Output only. URLs for accessing content published by this CA, such as the CA certificate
+   * and CRLs.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The accessUrls. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls getAccessUrls(); + /** + * + * + *
+   * Output only. URLs for accessing content published by this CA, such as the CA certificate
+   * and CRLs.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls access_urls = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrlsOrBuilder + getAccessUrlsOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+   * scheduled for deletion.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + boolean hasDeleteTime(); + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+   * scheduled for deletion.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + com.google.protobuf.Timestamp getDeleteTime(); + /** + * + * + *
+   * Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
+   * scheduled for deletion.
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateConfig.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateConfig.java new file mode 100644 index 00000000..52308add --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateConfig.java @@ -0,0 +1,2819 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * A [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig] describes an X.509 certificate or CSR that is to be
+ * created, as an alternative to using ASN.1.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateConfig} + */ +public final class CertificateConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateConfig) + CertificateConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateConfig.newBuilder() to construct. + private CertificateConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CertificateConfig( + 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.security.privateca.v1beta1.CertificateConfig.SubjectConfig.Builder + subBuilder = null; + if (subjectConfig_ != null) { + subBuilder = subjectConfig_.toBuilder(); + } + subjectConfig_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(subjectConfig_); + subjectConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder subBuilder = + null; + if (reusableConfig_ != null) { + subBuilder = reusableConfig_.toBuilder(); + } + reusableConfig_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reusableConfig_); + reusableConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder subBuilder = null; + if (publicKey_ != null) { + subBuilder = publicKey_.toBuilder(); + } + publicKey_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.PublicKey.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(publicKey_); + publicKey_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.class, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder.class); + } + + public interface SubjectConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Contains distinguished name fields such as the location and organization.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subject field is set. + */ + boolean hasSubject(); + /** + * + * + *
+     * Required. Contains distinguished name fields such as the location and organization.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subject. + */ + com.google.cloud.security.privateca.v1beta1.Subject getSubject(); + /** + * + * + *
+     * Required. Contains distinguished name fields such as the location and organization.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder getSubjectOrBuilder(); + + /** + * + * + *
+     * Optional. The "common name" of the distinguished name.
+     * 
+ * + * string common_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The commonName. + */ + java.lang.String getCommonName(); + /** + * + * + *
+     * Optional. The "common name" of the distinguished name.
+     * 
+ * + * string common_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for commonName. + */ + com.google.protobuf.ByteString getCommonNameBytes(); + + /** + * + * + *
+     * Optional. The subject alternative name fields.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subjectAltName field is set. + */ + boolean hasSubjectAltName(); + /** + * + * + *
+     * Optional. The subject alternative name fields.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subjectAltName. + */ + com.google.cloud.security.privateca.v1beta1.SubjectAltNames getSubjectAltName(); + /** + * + * + *
+     * Optional. The subject alternative name fields.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder + getSubjectAltNameOrBuilder(); + } + /** + * + * + *
+   * These values are used to create the distinguished name and subject
+   * alternative name fields in an X.509 certificate.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig} + */ + public static final class SubjectConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig) + SubjectConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubjectConfig.newBuilder() to construct. + private SubjectConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubjectConfig() { + commonName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubjectConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SubjectConfig( + 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.security.privateca.v1beta1.Subject.Builder subBuilder = null; + if (subject_ != null) { + subBuilder = subject_.toBuilder(); + } + subject_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.Subject.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(subject_); + subject_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + commonName_ = s; + break; + } + case 26: + { + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder subBuilder = + null; + if (subjectAltName_ != null) { + subBuilder = subjectAltName_.toBuilder(); + } + subjectAltName_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(subjectAltName_); + subjectAltName_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_SubjectConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_SubjectConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.class, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.Builder + .class); + } + + public static final int SUBJECT_FIELD_NUMBER = 1; + private com.google.cloud.security.privateca.v1beta1.Subject subject_; + /** + * + * + *
+     * Required. Contains distinguished name fields such as the location and organization.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subject field is set. + */ + @java.lang.Override + public boolean hasSubject() { + return subject_ != null; + } + /** + * + * + *
+     * Required. Contains distinguished name fields such as the location and organization.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subject. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Subject getSubject() { + return subject_ == null + ? com.google.cloud.security.privateca.v1beta1.Subject.getDefaultInstance() + : subject_; + } + /** + * + * + *
+     * Required. Contains distinguished name fields such as the location and organization.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder getSubjectOrBuilder() { + return getSubject(); + } + + public static final int COMMON_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object commonName_; + /** + * + * + *
+     * Optional. The "common name" of the distinguished name.
+     * 
+ * + * string common_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The commonName. + */ + @java.lang.Override + public java.lang.String getCommonName() { + java.lang.Object ref = commonName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + commonName_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. The "common name" of the distinguished name.
+     * 
+ * + * string common_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for commonName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCommonNameBytes() { + java.lang.Object ref = commonName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + commonName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_ALT_NAME_FIELD_NUMBER = 3; + private com.google.cloud.security.privateca.v1beta1.SubjectAltNames subjectAltName_; + /** + * + * + *
+     * Optional. The subject alternative name fields.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subjectAltName field is set. + */ + @java.lang.Override + public boolean hasSubjectAltName() { + return subjectAltName_ != null; + } + /** + * + * + *
+     * Optional. The subject alternative name fields.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subjectAltName. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubjectAltNames getSubjectAltName() { + return subjectAltName_ == null + ? com.google.cloud.security.privateca.v1beta1.SubjectAltNames.getDefaultInstance() + : subjectAltName_; + } + /** + * + * + *
+     * Optional. The subject alternative name fields.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder + getSubjectAltNameOrBuilder() { + return getSubjectAltName(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subject_ != null) { + output.writeMessage(1, getSubject()); + } + if (!getCommonNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, commonName_); + } + if (subjectAltName_ != null) { + output.writeMessage(3, getSubjectAltName()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (subject_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubject()); + } + if (!getCommonNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, commonName_); + } + if (subjectAltName_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSubjectAltName()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig other = + (com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig) obj; + + if (hasSubject() != other.hasSubject()) return false; + if (hasSubject()) { + if (!getSubject().equals(other.getSubject())) return false; + } + if (!getCommonName().equals(other.getCommonName())) return false; + if (hasSubjectAltName() != other.hasSubjectAltName()) return false; + if (hasSubjectAltName()) { + if (!getSubjectAltName().equals(other.getSubjectAltName())) return false; + } + if (!unknownFields.equals(other.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 (hasSubject()) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().hashCode(); + } + hash = (37 * hash) + COMMON_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCommonName().hashCode(); + if (hasSubjectAltName()) { + hash = (37 * hash) + SUBJECT_ALT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSubjectAltName().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * These values are used to create the distinguished name and subject
+     * alternative name fields in an X.509 certificate.
+     * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig) + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_SubjectConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_SubjectConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.class, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (subjectBuilder_ == null) { + subject_ = null; + } else { + subject_ = null; + subjectBuilder_ = null; + } + commonName_ = ""; + + if (subjectAltNameBuilder_ == null) { + subjectAltName_ = null; + } else { + subjectAltName_ = null; + subjectAltNameBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_SubjectConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig build() { + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig result = + new com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig(this); + if (subjectBuilder_ == null) { + result.subject_ = subject_; + } else { + result.subject_ = subjectBuilder_.build(); + } + result.commonName_ = commonName_; + if (subjectAltNameBuilder_ == null) { + result.subjectAltName_ = subjectAltName_; + } else { + result.subjectAltName_ = subjectAltNameBuilder_.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.security.privateca.v1beta1.CertificateConfig.SubjectConfig) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + .getDefaultInstance()) return this; + if (other.hasSubject()) { + mergeSubject(other.getSubject()); + } + if (!other.getCommonName().isEmpty()) { + commonName_ = other.commonName_; + onChanged(); + } + if (other.hasSubjectAltName()) { + mergeSubjectAltName(other.getSubjectAltName()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.security.privateca.v1beta1.Subject subject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Subject, + com.google.cloud.security.privateca.v1beta1.Subject.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder> + subjectBuilder_; + /** + * + * + *
+       * Required. Contains distinguished name fields such as the location and organization.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subject field is set. + */ + public boolean hasSubject() { + return subjectBuilder_ != null || subject_ != null; + } + /** + * + * + *
+       * Required. Contains distinguished name fields such as the location and organization.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subject. + */ + public com.google.cloud.security.privateca.v1beta1.Subject getSubject() { + if (subjectBuilder_ == null) { + return subject_ == null + ? com.google.cloud.security.privateca.v1beta1.Subject.getDefaultInstance() + : subject_; + } else { + return subjectBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Contains distinguished name fields such as the location and organization.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubject(com.google.cloud.security.privateca.v1beta1.Subject value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subject_ = value; + onChanged(); + } else { + subjectBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. Contains distinguished name fields such as the location and organization.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubject( + com.google.cloud.security.privateca.v1beta1.Subject.Builder builderForValue) { + if (subjectBuilder_ == null) { + subject_ = builderForValue.build(); + onChanged(); + } else { + subjectBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. Contains distinguished name fields such as the location and organization.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSubject(com.google.cloud.security.privateca.v1beta1.Subject value) { + if (subjectBuilder_ == null) { + if (subject_ != null) { + subject_ = + com.google.cloud.security.privateca.v1beta1.Subject.newBuilder(subject_) + .mergeFrom(value) + .buildPartial(); + } else { + subject_ = value; + } + onChanged(); + } else { + subjectBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. Contains distinguished name fields such as the location and organization.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSubject() { + if (subjectBuilder_ == null) { + subject_ = null; + onChanged(); + } else { + subject_ = null; + subjectBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. Contains distinguished name fields such as the location and organization.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.Subject.Builder getSubjectBuilder() { + + onChanged(); + return getSubjectFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Contains distinguished name fields such as the location and organization.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder getSubjectOrBuilder() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilder(); + } else { + return subject_ == null + ? com.google.cloud.security.privateca.v1beta1.Subject.getDefaultInstance() + : subject_; + } + } + /** + * + * + *
+       * Required. Contains distinguished name fields such as the location and organization.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Subject, + com.google.cloud.security.privateca.v1beta1.Subject.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Subject, + com.google.cloud.security.privateca.v1beta1.Subject.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder>( + getSubject(), getParentForChildren(), isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + private java.lang.Object commonName_ = ""; + /** + * + * + *
+       * Optional. The "common name" of the distinguished name.
+       * 
+ * + * string common_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The commonName. + */ + public java.lang.String getCommonName() { + java.lang.Object ref = commonName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + commonName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. The "common name" of the distinguished name.
+       * 
+ * + * string common_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for commonName. + */ + public com.google.protobuf.ByteString getCommonNameBytes() { + java.lang.Object ref = commonName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + commonName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. The "common name" of the distinguished name.
+       * 
+ * + * string common_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The commonName to set. + * @return This builder for chaining. + */ + public Builder setCommonName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + commonName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The "common name" of the distinguished name.
+       * 
+ * + * string common_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCommonName() { + + commonName_ = getDefaultInstance().getCommonName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The "common name" of the distinguished name.
+       * 
+ * + * string common_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for commonName to set. + * @return This builder for chaining. + */ + public Builder setCommonNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + commonName_ = value; + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.SubjectAltNames subjectAltName_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubjectAltNames, + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder> + subjectAltNameBuilder_; + /** + * + * + *
+       * Optional. The subject alternative name fields.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subjectAltName field is set. + */ + public boolean hasSubjectAltName() { + return subjectAltNameBuilder_ != null || subjectAltName_ != null; + } + /** + * + * + *
+       * Optional. The subject alternative name fields.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subjectAltName. + */ + public com.google.cloud.security.privateca.v1beta1.SubjectAltNames getSubjectAltName() { + if (subjectAltNameBuilder_ == null) { + return subjectAltName_ == null + ? com.google.cloud.security.privateca.v1beta1.SubjectAltNames.getDefaultInstance() + : subjectAltName_; + } else { + return subjectAltNameBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. The subject alternative name fields.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSubjectAltName( + com.google.cloud.security.privateca.v1beta1.SubjectAltNames value) { + if (subjectAltNameBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectAltName_ = value; + onChanged(); + } else { + subjectAltNameBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. The subject alternative name fields.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSubjectAltName( + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder builderForValue) { + if (subjectAltNameBuilder_ == null) { + subjectAltName_ = builderForValue.build(); + onChanged(); + } else { + subjectAltNameBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. The subject alternative name fields.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSubjectAltName( + com.google.cloud.security.privateca.v1beta1.SubjectAltNames value) { + if (subjectAltNameBuilder_ == null) { + if (subjectAltName_ != null) { + subjectAltName_ = + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.newBuilder( + subjectAltName_) + .mergeFrom(value) + .buildPartial(); + } else { + subjectAltName_ = value; + } + onChanged(); + } else { + subjectAltNameBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. The subject alternative name fields.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSubjectAltName() { + if (subjectAltNameBuilder_ == null) { + subjectAltName_ = null; + onChanged(); + } else { + subjectAltName_ = null; + subjectAltNameBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. The subject alternative name fields.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder + getSubjectAltNameBuilder() { + + onChanged(); + return getSubjectAltNameFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. The subject alternative name fields.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder + getSubjectAltNameOrBuilder() { + if (subjectAltNameBuilder_ != null) { + return subjectAltNameBuilder_.getMessageOrBuilder(); + } else { + return subjectAltName_ == null + ? com.google.cloud.security.privateca.v1beta1.SubjectAltNames.getDefaultInstance() + : subjectAltName_; + } + } + /** + * + * + *
+       * Optional. The subject alternative name fields.
+       * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubjectAltNames, + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder> + getSubjectAltNameFieldBuilder() { + if (subjectAltNameBuilder_ == null) { + subjectAltNameBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubjectAltNames, + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder>( + getSubjectAltName(), getParentForChildren(), isClean()); + subjectAltName_ = null; + } + return subjectAltNameBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig) + private static final com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SubjectConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SUBJECT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + subjectConfig_; + /** + * + * + *
+   * Required. Specifies some of the values in a certificate that are related to the
+   * subject.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subjectConfig field is set. + */ + @java.lang.Override + public boolean hasSubjectConfig() { + return subjectConfig_ != null; + } + /** + * + * + *
+   * Required. Specifies some of the values in a certificate that are related to the
+   * subject.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subjectConfig. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + getSubjectConfig() { + return subjectConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + .getDefaultInstance() + : subjectConfig_; + } + /** + * + * + *
+   * Required. Specifies some of the values in a certificate that are related to the
+   * subject.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfigOrBuilder + getSubjectConfigOrBuilder() { + return getSubjectConfig(); + } + + public static final int REUSABLE_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusableConfig_; + /** + * + * + *
+   * Required. Describes how some of the technical fields in a certificate should be
+   * populated.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfig field is set. + */ + @java.lang.Override + public boolean hasReusableConfig() { + return reusableConfig_ != null; + } + /** + * + * + *
+   * Required. Describes how some of the technical fields in a certificate should be
+   * populated.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfig. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper getReusableConfig() { + return reusableConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.getDefaultInstance() + : reusableConfig_; + } + /** + * + * + *
+   * Required. Describes how some of the technical fields in a certificate should be
+   * populated.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder + getReusableConfigOrBuilder() { + return getReusableConfig(); + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 3; + private com.google.cloud.security.privateca.v1beta1.PublicKey publicKey_; + /** + * + * + *
+   * Optional. The public key that corresponds to this config. This is, for example, used
+   * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+   * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the publicKey field is set. + */ + @java.lang.Override + public boolean hasPublicKey() { + return publicKey_ != null; + } + /** + * + * + *
+   * Optional. The public key that corresponds to this config. This is, for example, used
+   * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+   * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The publicKey. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.PublicKey getPublicKey() { + return publicKey_ == null + ? com.google.cloud.security.privateca.v1beta1.PublicKey.getDefaultInstance() + : publicKey_; + } + /** + * + * + *
+   * Optional. The public key that corresponds to this config. This is, for example, used
+   * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+   * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder getPublicKeyOrBuilder() { + return getPublicKey(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subjectConfig_ != null) { + output.writeMessage(1, getSubjectConfig()); + } + if (reusableConfig_ != null) { + output.writeMessage(2, getReusableConfig()); + } + if (publicKey_ != null) { + output.writeMessage(3, getPublicKey()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (subjectConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubjectConfig()); + } + if (reusableConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReusableConfig()); + } + if (publicKey_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPublicKey()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.CertificateConfig)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateConfig other = + (com.google.cloud.security.privateca.v1beta1.CertificateConfig) obj; + + if (hasSubjectConfig() != other.hasSubjectConfig()) return false; + if (hasSubjectConfig()) { + if (!getSubjectConfig().equals(other.getSubjectConfig())) return false; + } + if (hasReusableConfig() != other.hasReusableConfig()) return false; + if (hasReusableConfig()) { + if (!getReusableConfig().equals(other.getReusableConfig())) return false; + } + if (hasPublicKey() != other.hasPublicKey()) return false; + if (hasPublicKey()) { + if (!getPublicKey().equals(other.getPublicKey())) return false; + } + if (!unknownFields.equals(other.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 (hasSubjectConfig()) { + hash = (37 * hash) + SUBJECT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConfig().hashCode(); + } + if (hasReusableConfig()) { + hash = (37 * hash) + REUSABLE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getReusableConfig().hashCode(); + } + if (hasPublicKey()) { + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig] describes an X.509 certificate or CSR that is to be
+   * created, as an alternative to using ASN.1.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateConfig) + com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.class, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.CertificateConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (subjectConfigBuilder_ == null) { + subjectConfig_ = null; + } else { + subjectConfig_ = null; + subjectConfigBuilder_ = null; + } + if (reusableConfigBuilder_ == null) { + reusableConfig_ = null; + } else { + reusableConfig_ = null; + reusableConfigBuilder_ = null; + } + if (publicKeyBuilder_ == null) { + publicKey_ = null; + } else { + publicKey_ = null; + publicKeyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig build() { + com.google.cloud.security.privateca.v1beta1.CertificateConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateConfig result = + new com.google.cloud.security.privateca.v1beta1.CertificateConfig(this); + if (subjectConfigBuilder_ == null) { + result.subjectConfig_ = subjectConfig_; + } else { + result.subjectConfig_ = subjectConfigBuilder_.build(); + } + if (reusableConfigBuilder_ == null) { + result.reusableConfig_ = reusableConfig_; + } else { + result.reusableConfig_ = reusableConfigBuilder_.build(); + } + if (publicKeyBuilder_ == null) { + result.publicKey_ = publicKey_; + } else { + result.publicKey_ = publicKeyBuilder_.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.security.privateca.v1beta1.CertificateConfig) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.CertificateConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.security.privateca.v1beta1.CertificateConfig other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateConfig.getDefaultInstance()) + return this; + if (other.hasSubjectConfig()) { + mergeSubjectConfig(other.getSubjectConfig()); + } + if (other.hasReusableConfig()) { + mergeReusableConfig(other.getReusableConfig()); + } + if (other.hasPublicKey()) { + mergePublicKey(other.getPublicKey()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.CertificateConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + subjectConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfigOrBuilder> + subjectConfigBuilder_; + /** + * + * + *
+     * Required. Specifies some of the values in a certificate that are related to the
+     * subject.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subjectConfig field is set. + */ + public boolean hasSubjectConfig() { + return subjectConfigBuilder_ != null || subjectConfig_ != null; + } + /** + * + * + *
+     * Required. Specifies some of the values in a certificate that are related to the
+     * subject.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subjectConfig. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + getSubjectConfig() { + if (subjectConfigBuilder_ == null) { + return subjectConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + .getDefaultInstance() + : subjectConfig_; + } else { + return subjectConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Specifies some of the values in a certificate that are related to the
+     * subject.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubjectConfig( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig value) { + if (subjectConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConfig_ = value; + onChanged(); + } else { + subjectConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Specifies some of the values in a certificate that are related to the
+     * subject.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubjectConfig( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.Builder + builderForValue) { + if (subjectConfigBuilder_ == null) { + subjectConfig_ = builderForValue.build(); + onChanged(); + } else { + subjectConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Specifies some of the values in a certificate that are related to the
+     * subject.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSubjectConfig( + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig value) { + if (subjectConfigBuilder_ == null) { + if (subjectConfig_ != null) { + subjectConfig_ = + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + .newBuilder(subjectConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + subjectConfig_ = value; + } + onChanged(); + } else { + subjectConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Specifies some of the values in a certificate that are related to the
+     * subject.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSubjectConfig() { + if (subjectConfigBuilder_ == null) { + subjectConfig_ = null; + onChanged(); + } else { + subjectConfig_ = null; + subjectConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Specifies some of the values in a certificate that are related to the
+     * subject.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.Builder + getSubjectConfigBuilder() { + + onChanged(); + return getSubjectConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Specifies some of the values in a certificate that are related to the
+     * subject.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfigOrBuilder + getSubjectConfigOrBuilder() { + if (subjectConfigBuilder_ != null) { + return subjectConfigBuilder_.getMessageOrBuilder(); + } else { + return subjectConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + .getDefaultInstance() + : subjectConfig_; + } + } + /** + * + * + *
+     * Required. Specifies some of the values in a certificate that are related to the
+     * subject.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfigOrBuilder> + getSubjectConfigFieldBuilder() { + if (subjectConfigBuilder_ == null) { + subjectConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig, + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateConfig + .SubjectConfigOrBuilder>(getSubjectConfig(), getParentForChildren(), isClean()); + subjectConfig_ = null; + } + return subjectConfigBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusableConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder> + reusableConfigBuilder_; + /** + * + * + *
+     * Required. Describes how some of the technical fields in a certificate should be
+     * populated.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfig field is set. + */ + public boolean hasReusableConfig() { + return reusableConfigBuilder_ != null || reusableConfig_ != null; + } + /** + * + * + *
+     * Required. Describes how some of the technical fields in a certificate should be
+     * populated.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfig. + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper getReusableConfig() { + if (reusableConfigBuilder_ == null) { + return reusableConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.getDefaultInstance() + : reusableConfig_; + } else { + return reusableConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Describes how some of the technical fields in a certificate should be
+     * populated.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReusableConfig( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper value) { + if (reusableConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reusableConfig_ = value; + onChanged(); + } else { + reusableConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Describes how some of the technical fields in a certificate should be
+     * populated.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReusableConfig( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder builderForValue) { + if (reusableConfigBuilder_ == null) { + reusableConfig_ = builderForValue.build(); + onChanged(); + } else { + reusableConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Describes how some of the technical fields in a certificate should be
+     * populated.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeReusableConfig( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper value) { + if (reusableConfigBuilder_ == null) { + if (reusableConfig_ != null) { + reusableConfig_ = + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.newBuilder( + reusableConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + reusableConfig_ = value; + } + onChanged(); + } else { + reusableConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Describes how some of the technical fields in a certificate should be
+     * populated.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearReusableConfig() { + if (reusableConfigBuilder_ == null) { + reusableConfig_ = null; + onChanged(); + } else { + reusableConfig_ = null; + reusableConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Describes how some of the technical fields in a certificate should be
+     * populated.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder + getReusableConfigBuilder() { + + onChanged(); + return getReusableConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Describes how some of the technical fields in a certificate should be
+     * populated.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder + getReusableConfigOrBuilder() { + if (reusableConfigBuilder_ != null) { + return reusableConfigBuilder_.getMessageOrBuilder(); + } else { + return reusableConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.getDefaultInstance() + : reusableConfig_; + } + } + /** + * + * + *
+     * Required. Describes how some of the technical fields in a certificate should be
+     * populated.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder> + getReusableConfigFieldBuilder() { + if (reusableConfigBuilder_ == null) { + reusableConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder>( + getReusableConfig(), getParentForChildren(), isClean()); + reusableConfig_ = null; + } + return reusableConfigBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.PublicKey publicKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.PublicKey, + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder, + com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder> + publicKeyBuilder_; + /** + * + * + *
+     * Optional. The public key that corresponds to this config. This is, for example, used
+     * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+     * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the publicKey field is set. + */ + public boolean hasPublicKey() { + return publicKeyBuilder_ != null || publicKey_ != null; + } + /** + * + * + *
+     * Optional. The public key that corresponds to this config. This is, for example, used
+     * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+     * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The publicKey. + */ + public com.google.cloud.security.privateca.v1beta1.PublicKey getPublicKey() { + if (publicKeyBuilder_ == null) { + return publicKey_ == null + ? com.google.cloud.security.privateca.v1beta1.PublicKey.getDefaultInstance() + : publicKey_; + } else { + return publicKeyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The public key that corresponds to this config. This is, for example, used
+     * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+     * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPublicKey(com.google.cloud.security.privateca.v1beta1.PublicKey value) { + if (publicKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publicKey_ = value; + onChanged(); + } else { + publicKeyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The public key that corresponds to this config. This is, for example, used
+     * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+     * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPublicKey( + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder builderForValue) { + if (publicKeyBuilder_ == null) { + publicKey_ = builderForValue.build(); + onChanged(); + } else { + publicKeyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The public key that corresponds to this config. This is, for example, used
+     * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+     * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePublicKey(com.google.cloud.security.privateca.v1beta1.PublicKey value) { + if (publicKeyBuilder_ == null) { + if (publicKey_ != null) { + publicKey_ = + com.google.cloud.security.privateca.v1beta1.PublicKey.newBuilder(publicKey_) + .mergeFrom(value) + .buildPartial(); + } else { + publicKey_ = value; + } + onChanged(); + } else { + publicKeyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The public key that corresponds to this config. This is, for example, used
+     * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+     * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPublicKey() { + if (publicKeyBuilder_ == null) { + publicKey_ = null; + onChanged(); + } else { + publicKey_ = null; + publicKeyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The public key that corresponds to this config. This is, for example, used
+     * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+     * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.PublicKey.Builder getPublicKeyBuilder() { + + onChanged(); + return getPublicKeyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The public key that corresponds to this config. This is, for example, used
+     * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+     * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder getPublicKeyOrBuilder() { + if (publicKeyBuilder_ != null) { + return publicKeyBuilder_.getMessageOrBuilder(); + } else { + return publicKey_ == null + ? com.google.cloud.security.privateca.v1beta1.PublicKey.getDefaultInstance() + : publicKey_; + } + } + /** + * + * + *
+     * Optional. The public key that corresponds to this config. This is, for example, used
+     * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+     * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.PublicKey, + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder, + com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder> + getPublicKeyFieldBuilder() { + if (publicKeyBuilder_ == null) { + publicKeyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.PublicKey, + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder, + com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder>( + getPublicKey(), getParentForChildren(), isClean()); + publicKey_ = null; + } + return publicKeyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CertificateConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateConfig) + private static final com.google.cloud.security.privateca.v1beta1.CertificateConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.CertificateConfig(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CertificateConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateConfigOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateConfigOrBuilder.java new file mode 100644 index 00000000..45f8a057 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateConfigOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface CertificateConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Specifies some of the values in a certificate that are related to the
+   * subject.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subjectConfig field is set. + */ + boolean hasSubjectConfig(); + /** + * + * + *
+   * Required. Specifies some of the values in a certificate that are related to the
+   * subject.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subjectConfig. + */ + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig getSubjectConfig(); + /** + * + * + *
+   * Required. Specifies some of the values in a certificate that are related to the
+   * subject.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig subject_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfigOrBuilder + getSubjectConfigOrBuilder(); + + /** + * + * + *
+   * Required. Describes how some of the technical fields in a certificate should be
+   * populated.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfig field is set. + */ + boolean hasReusableConfig(); + /** + * + * + *
+   * Required. Describes how some of the technical fields in a certificate should be
+   * populated.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfig. + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper getReusableConfig(); + /** + * + * + *
+   * Required. Describes how some of the technical fields in a certificate should be
+   * populated.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigWrapper reusable_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder + getReusableConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The public key that corresponds to this config. This is, for example, used
+   * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+   * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the publicKey field is set. + */ + boolean hasPublicKey(); + /** + * + * + *
+   * Optional. The public key that corresponds to this config. This is, for example, used
+   * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+   * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The publicKey. + */ + com.google.cloud.security.privateca.v1beta1.PublicKey getPublicKey(); + /** + * + * + *
+   * Optional. The public key that corresponds to this config. This is, for example, used
+   * when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
+   * self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder getPublicKeyOrBuilder(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateDescription.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateDescription.java new file mode 100644 index 00000000..b185e46d --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateDescription.java @@ -0,0 +1,6866 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * A [CertificateDescription][google.cloud.security.privateca.v1beta1.CertificateDescription] describes an X.509 certificate or CSR that has
+ * been issued, as an alternative to using ASN.1 / X.509.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateDescription} + */ +public final class CertificateDescription extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateDescription) + CertificateDescriptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateDescription.newBuilder() to construct. + private CertificateDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateDescription() { + crlDistributionPoints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + aiaIssuingCertificateUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateDescription(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CertificateDescription( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .Builder + subBuilder = null; + if (subjectDescription_ != null) { + subBuilder = subjectDescription_.toBuilder(); + } + subjectDescription_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(subjectDescription_); + subjectDescription_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder subBuilder = + null; + if (configValues_ != null) { + subBuilder = configValues_.toBuilder(); + } + configValues_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(configValues_); + configValues_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder subBuilder = null; + if (publicKey_ != null) { + subBuilder = publicKey_.toBuilder(); + } + publicKey_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.PublicKey.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(publicKey_); + publicKey_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder + subBuilder = null; + if (subjectKeyId_ != null) { + subBuilder = subjectKeyId_.toBuilder(); + } + subjectKeyId_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(subjectKeyId_); + subjectKeyId_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder + subBuilder = null; + if (authorityKeyId_ != null) { + subBuilder = authorityKeyId_.toBuilder(); + } + authorityKeyId_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(authorityKeyId_); + authorityKeyId_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + crlDistributionPoints_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + crlDistributionPoints_.add(s); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + aiaIssuingCertificateUrls_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + aiaIssuingCertificateUrls_.add(s); + break; + } + case 66: + { + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.Builder + subBuilder = null; + if (certFingerprint_ != null) { + subBuilder = certFingerprint_.toBuilder(); + } + certFingerprint_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certFingerprint_); + certFingerprint_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + crlDistributionPoints_ = crlDistributionPoints_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + aiaIssuingCertificateUrls_ = aiaIssuingCertificateUrls_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.class, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder.class); + } + + public interface SubjectDescriptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Contains distinguished name fields such as the location and organization.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + * + * @return Whether the subject field is set. + */ + boolean hasSubject(); + /** + * + * + *
+     * Contains distinguished name fields such as the location and organization.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + * + * @return The subject. + */ + com.google.cloud.security.privateca.v1beta1.Subject getSubject(); + /** + * + * + *
+     * Contains distinguished name fields such as the location and organization.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + */ + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder getSubjectOrBuilder(); + + /** + * + * + *
+     * The "common name" of the distinguished name.
+     * 
+ * + * string common_name = 2; + * + * @return The commonName. + */ + java.lang.String getCommonName(); + /** + * + * + *
+     * The "common name" of the distinguished name.
+     * 
+ * + * string common_name = 2; + * + * @return The bytes for commonName. + */ + com.google.protobuf.ByteString getCommonNameBytes(); + + /** + * + * + *
+     * The subject alternative name fields.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + * + * @return Whether the subjectAltName field is set. + */ + boolean hasSubjectAltName(); + /** + * + * + *
+     * The subject alternative name fields.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + * + * @return The subjectAltName. + */ + com.google.cloud.security.privateca.v1beta1.SubjectAltNames getSubjectAltName(); + /** + * + * + *
+     * The subject alternative name fields.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + */ + com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder + getSubjectAltNameOrBuilder(); + + /** + * + * + *
+     * The serial number encoded in lowercase hexadecimal.
+     * 
+ * + * string hex_serial_number = 4; + * + * @return The hexSerialNumber. + */ + java.lang.String getHexSerialNumber(); + /** + * + * + *
+     * The serial number encoded in lowercase hexadecimal.
+     * 
+ * + * string hex_serial_number = 4; + * + * @return The bytes for hexSerialNumber. + */ + com.google.protobuf.ByteString getHexSerialNumberBytes(); + + /** + * + * + *
+     * For convenience, the actual lifetime of an issued certificate.
+     * Corresponds to 'not_after_time' - 'not_before_time'.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5; + * + * @return Whether the lifetime field is set. + */ + boolean hasLifetime(); + /** + * + * + *
+     * For convenience, the actual lifetime of an issued certificate.
+     * Corresponds to 'not_after_time' - 'not_before_time'.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5; + * + * @return The lifetime. + */ + com.google.protobuf.Duration getLifetime(); + /** + * + * + *
+     * For convenience, the actual lifetime of an issued certificate.
+     * Corresponds to 'not_after_time' - 'not_before_time'.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5; + */ + com.google.protobuf.DurationOrBuilder getLifetimeOrBuilder(); + + /** + * + * + *
+     * The time at which the certificate becomes valid.
+     * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + * + * @return Whether the notBeforeTime field is set. + */ + boolean hasNotBeforeTime(); + /** + * + * + *
+     * The time at which the certificate becomes valid.
+     * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + * + * @return The notBeforeTime. + */ + com.google.protobuf.Timestamp getNotBeforeTime(); + /** + * + * + *
+     * The time at which the certificate becomes valid.
+     * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getNotBeforeTimeOrBuilder(); + + /** + * + * + *
+     * The time at which the certificate expires.
+     * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + * + * @return Whether the notAfterTime field is set. + */ + boolean hasNotAfterTime(); + /** + * + * + *
+     * The time at which the certificate expires.
+     * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + * + * @return The notAfterTime. + */ + com.google.protobuf.Timestamp getNotAfterTime(); + /** + * + * + *
+     * The time at which the certificate expires.
+     * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getNotAfterTimeOrBuilder(); + } + /** + * + * + *
+   * These values describe fields in an issued X.509 certificate such as the
+   * distinguished name, subject alternative names, serial number, and lifetime.
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription} + */ + public static final class SubjectDescription extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription) + SubjectDescriptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubjectDescription.newBuilder() to construct. + private SubjectDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubjectDescription() { + commonName_ = ""; + hexSerialNumber_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubjectDescription(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SubjectDescription( + 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.security.privateca.v1beta1.Subject.Builder subBuilder = null; + if (subject_ != null) { + subBuilder = subject_.toBuilder(); + } + subject_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.Subject.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(subject_); + subject_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + commonName_ = s; + break; + } + case 26: + { + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder subBuilder = + null; + if (subjectAltName_ != null) { + subBuilder = subjectAltName_.toBuilder(); + } + subjectAltName_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(subjectAltName_); + subjectAltName_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + hexSerialNumber_ = s; + break; + } + case 42: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (lifetime_ != null) { + subBuilder = lifetime_.toBuilder(); + } + lifetime_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lifetime_); + lifetime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (notBeforeTime_ != null) { + subBuilder = notBeforeTime_.toBuilder(); + } + notBeforeTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(notBeforeTime_); + notBeforeTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (notAfterTime_ != null) { + subBuilder = notAfterTime_.toBuilder(); + } + notAfterTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(notAfterTime_); + notAfterTime_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_SubjectDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_SubjectDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .class, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .Builder.class); + } + + public static final int SUBJECT_FIELD_NUMBER = 1; + private com.google.cloud.security.privateca.v1beta1.Subject subject_; + /** + * + * + *
+     * Contains distinguished name fields such as the location and organization.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + * + * @return Whether the subject field is set. + */ + @java.lang.Override + public boolean hasSubject() { + return subject_ != null; + } + /** + * + * + *
+     * Contains distinguished name fields such as the location and organization.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + * + * @return The subject. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Subject getSubject() { + return subject_ == null + ? com.google.cloud.security.privateca.v1beta1.Subject.getDefaultInstance() + : subject_; + } + /** + * + * + *
+     * Contains distinguished name fields such as the location and organization.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder getSubjectOrBuilder() { + return getSubject(); + } + + public static final int COMMON_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object commonName_; + /** + * + * + *
+     * The "common name" of the distinguished name.
+     * 
+ * + * string common_name = 2; + * + * @return The commonName. + */ + @java.lang.Override + public java.lang.String getCommonName() { + java.lang.Object ref = commonName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + commonName_ = s; + return s; + } + } + /** + * + * + *
+     * The "common name" of the distinguished name.
+     * 
+ * + * string common_name = 2; + * + * @return The bytes for commonName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCommonNameBytes() { + java.lang.Object ref = commonName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + commonName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_ALT_NAME_FIELD_NUMBER = 3; + private com.google.cloud.security.privateca.v1beta1.SubjectAltNames subjectAltName_; + /** + * + * + *
+     * The subject alternative name fields.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + * + * @return Whether the subjectAltName field is set. + */ + @java.lang.Override + public boolean hasSubjectAltName() { + return subjectAltName_ != null; + } + /** + * + * + *
+     * The subject alternative name fields.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + * + * @return The subjectAltName. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubjectAltNames getSubjectAltName() { + return subjectAltName_ == null + ? com.google.cloud.security.privateca.v1beta1.SubjectAltNames.getDefaultInstance() + : subjectAltName_; + } + /** + * + * + *
+     * The subject alternative name fields.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder + getSubjectAltNameOrBuilder() { + return getSubjectAltName(); + } + + public static final int HEX_SERIAL_NUMBER_FIELD_NUMBER = 4; + private volatile java.lang.Object hexSerialNumber_; + /** + * + * + *
+     * The serial number encoded in lowercase hexadecimal.
+     * 
+ * + * string hex_serial_number = 4; + * + * @return The hexSerialNumber. + */ + @java.lang.Override + public java.lang.String getHexSerialNumber() { + java.lang.Object ref = hexSerialNumber_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hexSerialNumber_ = s; + return s; + } + } + /** + * + * + *
+     * The serial number encoded in lowercase hexadecimal.
+     * 
+ * + * string hex_serial_number = 4; + * + * @return The bytes for hexSerialNumber. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHexSerialNumberBytes() { + java.lang.Object ref = hexSerialNumber_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hexSerialNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIFETIME_FIELD_NUMBER = 5; + private com.google.protobuf.Duration lifetime_; + /** + * + * + *
+     * For convenience, the actual lifetime of an issued certificate.
+     * Corresponds to 'not_after_time' - 'not_before_time'.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5; + * + * @return Whether the lifetime field is set. + */ + @java.lang.Override + public boolean hasLifetime() { + return lifetime_ != null; + } + /** + * + * + *
+     * For convenience, the actual lifetime of an issued certificate.
+     * Corresponds to 'not_after_time' - 'not_before_time'.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5; + * + * @return The lifetime. + */ + @java.lang.Override + public com.google.protobuf.Duration getLifetime() { + return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_; + } + /** + * + * + *
+     * For convenience, the actual lifetime of an issued certificate.
+     * Corresponds to 'not_after_time' - 'not_before_time'.
+     * 
+ * + * .google.protobuf.Duration lifetime = 5; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getLifetimeOrBuilder() { + return getLifetime(); + } + + public static final int NOT_BEFORE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp notBeforeTime_; + /** + * + * + *
+     * The time at which the certificate becomes valid.
+     * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + * + * @return Whether the notBeforeTime field is set. + */ + @java.lang.Override + public boolean hasNotBeforeTime() { + return notBeforeTime_ != null; + } + /** + * + * + *
+     * The time at which the certificate becomes valid.
+     * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + * + * @return The notBeforeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getNotBeforeTime() { + return notBeforeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : notBeforeTime_; + } + /** + * + * + *
+     * The time at which the certificate becomes valid.
+     * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getNotBeforeTimeOrBuilder() { + return getNotBeforeTime(); + } + + public static final int NOT_AFTER_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp notAfterTime_; + /** + * + * + *
+     * The time at which the certificate expires.
+     * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + * + * @return Whether the notAfterTime field is set. + */ + @java.lang.Override + public boolean hasNotAfterTime() { + return notAfterTime_ != null; + } + /** + * + * + *
+     * The time at which the certificate expires.
+     * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + * + * @return The notAfterTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getNotAfterTime() { + return notAfterTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : notAfterTime_; + } + /** + * + * + *
+     * The time at which the certificate expires.
+     * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getNotAfterTimeOrBuilder() { + return getNotAfterTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subject_ != null) { + output.writeMessage(1, getSubject()); + } + if (!getCommonNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, commonName_); + } + if (subjectAltName_ != null) { + output.writeMessage(3, getSubjectAltName()); + } + if (!getHexSerialNumberBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, hexSerialNumber_); + } + if (lifetime_ != null) { + output.writeMessage(5, getLifetime()); + } + if (notBeforeTime_ != null) { + output.writeMessage(6, getNotBeforeTime()); + } + if (notAfterTime_ != null) { + output.writeMessage(7, getNotAfterTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (subject_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubject()); + } + if (!getCommonNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, commonName_); + } + if (subjectAltName_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSubjectAltName()); + } + if (!getHexSerialNumberBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, hexSerialNumber_); + } + if (lifetime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getLifetime()); + } + if (notBeforeTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getNotBeforeTime()); + } + if (notAfterTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getNotAfterTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription other = + (com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription) + obj; + + if (hasSubject() != other.hasSubject()) return false; + if (hasSubject()) { + if (!getSubject().equals(other.getSubject())) return false; + } + if (!getCommonName().equals(other.getCommonName())) return false; + if (hasSubjectAltName() != other.hasSubjectAltName()) return false; + if (hasSubjectAltName()) { + if (!getSubjectAltName().equals(other.getSubjectAltName())) return false; + } + if (!getHexSerialNumber().equals(other.getHexSerialNumber())) return false; + if (hasLifetime() != other.hasLifetime()) return false; + if (hasLifetime()) { + if (!getLifetime().equals(other.getLifetime())) return false; + } + if (hasNotBeforeTime() != other.hasNotBeforeTime()) return false; + if (hasNotBeforeTime()) { + if (!getNotBeforeTime().equals(other.getNotBeforeTime())) return false; + } + if (hasNotAfterTime() != other.hasNotAfterTime()) return false; + if (hasNotAfterTime()) { + if (!getNotAfterTime().equals(other.getNotAfterTime())) return false; + } + if (!unknownFields.equals(other.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 (hasSubject()) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().hashCode(); + } + hash = (37 * hash) + COMMON_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCommonName().hashCode(); + if (hasSubjectAltName()) { + hash = (37 * hash) + SUBJECT_ALT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSubjectAltName().hashCode(); + } + hash = (37 * hash) + HEX_SERIAL_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getHexSerialNumber().hashCode(); + if (hasLifetime()) { + hash = (37 * hash) + LIFETIME_FIELD_NUMBER; + hash = (53 * hash) + getLifetime().hashCode(); + } + if (hasNotBeforeTime()) { + hash = (37 * hash) + NOT_BEFORE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getNotBeforeTime().hashCode(); + } + if (hasNotAfterTime()) { + hash = (37 * hash) + NOT_AFTER_TIME_FIELD_NUMBER; + hash = (53 * hash) + getNotAfterTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * These values describe fields in an issued X.509 certificate such as the
+     * distinguished name, subject alternative names, serial number, and lifetime.
+     * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription) + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescriptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_SubjectDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_SubjectDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription.class, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (subjectBuilder_ == null) { + subject_ = null; + } else { + subject_ = null; + subjectBuilder_ = null; + } + commonName_ = ""; + + if (subjectAltNameBuilder_ == null) { + subjectAltName_ = null; + } else { + subjectAltName_ = null; + subjectAltNameBuilder_ = null; + } + hexSerialNumber_ = ""; + + if (lifetimeBuilder_ == null) { + lifetime_ = null; + } else { + lifetime_ = null; + lifetimeBuilder_ = null; + } + if (notBeforeTimeBuilder_ == null) { + notBeforeTime_ = null; + } else { + notBeforeTime_ = null; + notBeforeTimeBuilder_ = null; + } + if (notAfterTimeBuilder_ == null) { + notAfterTime_ = null; + } else { + notAfterTime_ = null; + notAfterTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_SubjectDescription_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + build() { + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + result = + new com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription(this); + if (subjectBuilder_ == null) { + result.subject_ = subject_; + } else { + result.subject_ = subjectBuilder_.build(); + } + result.commonName_ = commonName_; + if (subjectAltNameBuilder_ == null) { + result.subjectAltName_ = subjectAltName_; + } else { + result.subjectAltName_ = subjectAltNameBuilder_.build(); + } + result.hexSerialNumber_ = hexSerialNumber_; + if (lifetimeBuilder_ == null) { + result.lifetime_ = lifetime_; + } else { + result.lifetime_ = lifetimeBuilder_.build(); + } + if (notBeforeTimeBuilder_ == null) { + result.notBeforeTime_ = notBeforeTime_; + } else { + result.notBeforeTime_ = notBeforeTimeBuilder_.build(); + } + if (notAfterTimeBuilder_ == null) { + result.notAfterTime_ = notAfterTime_; + } else { + result.notAfterTime_ = notAfterTimeBuilder_.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.security.privateca.v1beta1.CertificateDescription.SubjectDescription) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .getDefaultInstance()) return this; + if (other.hasSubject()) { + mergeSubject(other.getSubject()); + } + if (!other.getCommonName().isEmpty()) { + commonName_ = other.commonName_; + onChanged(); + } + if (other.hasSubjectAltName()) { + mergeSubjectAltName(other.getSubjectAltName()); + } + if (!other.getHexSerialNumber().isEmpty()) { + hexSerialNumber_ = other.hexSerialNumber_; + onChanged(); + } + if (other.hasLifetime()) { + mergeLifetime(other.getLifetime()); + } + if (other.hasNotBeforeTime()) { + mergeNotBeforeTime(other.getNotBeforeTime()); + } + if (other.hasNotAfterTime()) { + mergeNotAfterTime(other.getNotAfterTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.security.privateca.v1beta1.Subject subject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Subject, + com.google.cloud.security.privateca.v1beta1.Subject.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder> + subjectBuilder_; + /** + * + * + *
+       * Contains distinguished name fields such as the location and organization.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + * + * @return Whether the subject field is set. + */ + public boolean hasSubject() { + return subjectBuilder_ != null || subject_ != null; + } + /** + * + * + *
+       * Contains distinguished name fields such as the location and organization.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + * + * @return The subject. + */ + public com.google.cloud.security.privateca.v1beta1.Subject getSubject() { + if (subjectBuilder_ == null) { + return subject_ == null + ? com.google.cloud.security.privateca.v1beta1.Subject.getDefaultInstance() + : subject_; + } else { + return subjectBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Contains distinguished name fields such as the location and organization.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + */ + public Builder setSubject(com.google.cloud.security.privateca.v1beta1.Subject value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subject_ = value; + onChanged(); + } else { + subjectBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Contains distinguished name fields such as the location and organization.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + */ + public Builder setSubject( + com.google.cloud.security.privateca.v1beta1.Subject.Builder builderForValue) { + if (subjectBuilder_ == null) { + subject_ = builderForValue.build(); + onChanged(); + } else { + subjectBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Contains distinguished name fields such as the location and organization.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + */ + public Builder mergeSubject(com.google.cloud.security.privateca.v1beta1.Subject value) { + if (subjectBuilder_ == null) { + if (subject_ != null) { + subject_ = + com.google.cloud.security.privateca.v1beta1.Subject.newBuilder(subject_) + .mergeFrom(value) + .buildPartial(); + } else { + subject_ = value; + } + onChanged(); + } else { + subjectBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Contains distinguished name fields such as the location and organization.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + */ + public Builder clearSubject() { + if (subjectBuilder_ == null) { + subject_ = null; + onChanged(); + } else { + subject_ = null; + subjectBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Contains distinguished name fields such as the location and organization.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + */ + public com.google.cloud.security.privateca.v1beta1.Subject.Builder getSubjectBuilder() { + + onChanged(); + return getSubjectFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Contains distinguished name fields such as the location and organization.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + */ + public com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder getSubjectOrBuilder() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilder(); + } else { + return subject_ == null + ? com.google.cloud.security.privateca.v1beta1.Subject.getDefaultInstance() + : subject_; + } + } + /** + * + * + *
+       * Contains distinguished name fields such as the location and organization.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.Subject subject = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Subject, + com.google.cloud.security.privateca.v1beta1.Subject.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Subject, + com.google.cloud.security.privateca.v1beta1.Subject.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder>( + getSubject(), getParentForChildren(), isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + private java.lang.Object commonName_ = ""; + /** + * + * + *
+       * The "common name" of the distinguished name.
+       * 
+ * + * string common_name = 2; + * + * @return The commonName. + */ + public java.lang.String getCommonName() { + java.lang.Object ref = commonName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + commonName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The "common name" of the distinguished name.
+       * 
+ * + * string common_name = 2; + * + * @return The bytes for commonName. + */ + public com.google.protobuf.ByteString getCommonNameBytes() { + java.lang.Object ref = commonName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + commonName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The "common name" of the distinguished name.
+       * 
+ * + * string common_name = 2; + * + * @param value The commonName to set. + * @return This builder for chaining. + */ + public Builder setCommonName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + commonName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The "common name" of the distinguished name.
+       * 
+ * + * string common_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearCommonName() { + + commonName_ = getDefaultInstance().getCommonName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The "common name" of the distinguished name.
+       * 
+ * + * string common_name = 2; + * + * @param value The bytes for commonName to set. + * @return This builder for chaining. + */ + public Builder setCommonNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + commonName_ = value; + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.SubjectAltNames subjectAltName_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubjectAltNames, + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder> + subjectAltNameBuilder_; + /** + * + * + *
+       * The subject alternative name fields.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + * + * @return Whether the subjectAltName field is set. + */ + public boolean hasSubjectAltName() { + return subjectAltNameBuilder_ != null || subjectAltName_ != null; + } + /** + * + * + *
+       * The subject alternative name fields.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + * + * @return The subjectAltName. + */ + public com.google.cloud.security.privateca.v1beta1.SubjectAltNames getSubjectAltName() { + if (subjectAltNameBuilder_ == null) { + return subjectAltName_ == null + ? com.google.cloud.security.privateca.v1beta1.SubjectAltNames.getDefaultInstance() + : subjectAltName_; + } else { + return subjectAltNameBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The subject alternative name fields.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + */ + public Builder setSubjectAltName( + com.google.cloud.security.privateca.v1beta1.SubjectAltNames value) { + if (subjectAltNameBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectAltName_ = value; + onChanged(); + } else { + subjectAltNameBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The subject alternative name fields.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + */ + public Builder setSubjectAltName( + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder builderForValue) { + if (subjectAltNameBuilder_ == null) { + subjectAltName_ = builderForValue.build(); + onChanged(); + } else { + subjectAltNameBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The subject alternative name fields.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + */ + public Builder mergeSubjectAltName( + com.google.cloud.security.privateca.v1beta1.SubjectAltNames value) { + if (subjectAltNameBuilder_ == null) { + if (subjectAltName_ != null) { + subjectAltName_ = + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.newBuilder( + subjectAltName_) + .mergeFrom(value) + .buildPartial(); + } else { + subjectAltName_ = value; + } + onChanged(); + } else { + subjectAltNameBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The subject alternative name fields.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + */ + public Builder clearSubjectAltName() { + if (subjectAltNameBuilder_ == null) { + subjectAltName_ = null; + onChanged(); + } else { + subjectAltName_ = null; + subjectAltNameBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The subject alternative name fields.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + */ + public com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder + getSubjectAltNameBuilder() { + + onChanged(); + return getSubjectAltNameFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The subject alternative name fields.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + */ + public com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder + getSubjectAltNameOrBuilder() { + if (subjectAltNameBuilder_ != null) { + return subjectAltNameBuilder_.getMessageOrBuilder(); + } else { + return subjectAltName_ == null + ? com.google.cloud.security.privateca.v1beta1.SubjectAltNames.getDefaultInstance() + : subjectAltName_; + } + } + /** + * + * + *
+       * The subject alternative name fields.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.SubjectAltNames subject_alt_name = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubjectAltNames, + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder> + getSubjectAltNameFieldBuilder() { + if (subjectAltNameBuilder_ == null) { + subjectAltNameBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubjectAltNames, + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder, + com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder>( + getSubjectAltName(), getParentForChildren(), isClean()); + subjectAltName_ = null; + } + return subjectAltNameBuilder_; + } + + private java.lang.Object hexSerialNumber_ = ""; + /** + * + * + *
+       * The serial number encoded in lowercase hexadecimal.
+       * 
+ * + * string hex_serial_number = 4; + * + * @return The hexSerialNumber. + */ + public java.lang.String getHexSerialNumber() { + java.lang.Object ref = hexSerialNumber_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hexSerialNumber_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The serial number encoded in lowercase hexadecimal.
+       * 
+ * + * string hex_serial_number = 4; + * + * @return The bytes for hexSerialNumber. + */ + public com.google.protobuf.ByteString getHexSerialNumberBytes() { + java.lang.Object ref = hexSerialNumber_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hexSerialNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The serial number encoded in lowercase hexadecimal.
+       * 
+ * + * string hex_serial_number = 4; + * + * @param value The hexSerialNumber to set. + * @return This builder for chaining. + */ + public Builder setHexSerialNumber(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hexSerialNumber_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The serial number encoded in lowercase hexadecimal.
+       * 
+ * + * string hex_serial_number = 4; + * + * @return This builder for chaining. + */ + public Builder clearHexSerialNumber() { + + hexSerialNumber_ = getDefaultInstance().getHexSerialNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The serial number encoded in lowercase hexadecimal.
+       * 
+ * + * string hex_serial_number = 4; + * + * @param value The bytes for hexSerialNumber to set. + * @return This builder for chaining. + */ + public Builder setHexSerialNumberBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hexSerialNumber_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration lifetime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + lifetimeBuilder_; + /** + * + * + *
+       * For convenience, the actual lifetime of an issued certificate.
+       * Corresponds to 'not_after_time' - 'not_before_time'.
+       * 
+ * + * .google.protobuf.Duration lifetime = 5; + * + * @return Whether the lifetime field is set. + */ + public boolean hasLifetime() { + return lifetimeBuilder_ != null || lifetime_ != null; + } + /** + * + * + *
+       * For convenience, the actual lifetime of an issued certificate.
+       * Corresponds to 'not_after_time' - 'not_before_time'.
+       * 
+ * + * .google.protobuf.Duration lifetime = 5; + * + * @return The lifetime. + */ + public com.google.protobuf.Duration getLifetime() { + if (lifetimeBuilder_ == null) { + return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_; + } else { + return lifetimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * For convenience, the actual lifetime of an issued certificate.
+       * Corresponds to 'not_after_time' - 'not_before_time'.
+       * 
+ * + * .google.protobuf.Duration lifetime = 5; + */ + public Builder setLifetime(com.google.protobuf.Duration value) { + if (lifetimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lifetime_ = value; + onChanged(); + } else { + lifetimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * For convenience, the actual lifetime of an issued certificate.
+       * Corresponds to 'not_after_time' - 'not_before_time'.
+       * 
+ * + * .google.protobuf.Duration lifetime = 5; + */ + public Builder setLifetime(com.google.protobuf.Duration.Builder builderForValue) { + if (lifetimeBuilder_ == null) { + lifetime_ = builderForValue.build(); + onChanged(); + } else { + lifetimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * For convenience, the actual lifetime of an issued certificate.
+       * Corresponds to 'not_after_time' - 'not_before_time'.
+       * 
+ * + * .google.protobuf.Duration lifetime = 5; + */ + public Builder mergeLifetime(com.google.protobuf.Duration value) { + if (lifetimeBuilder_ == null) { + if (lifetime_ != null) { + lifetime_ = + com.google.protobuf.Duration.newBuilder(lifetime_).mergeFrom(value).buildPartial(); + } else { + lifetime_ = value; + } + onChanged(); + } else { + lifetimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * For convenience, the actual lifetime of an issued certificate.
+       * Corresponds to 'not_after_time' - 'not_before_time'.
+       * 
+ * + * .google.protobuf.Duration lifetime = 5; + */ + public Builder clearLifetime() { + if (lifetimeBuilder_ == null) { + lifetime_ = null; + onChanged(); + } else { + lifetime_ = null; + lifetimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * For convenience, the actual lifetime of an issued certificate.
+       * Corresponds to 'not_after_time' - 'not_before_time'.
+       * 
+ * + * .google.protobuf.Duration lifetime = 5; + */ + public com.google.protobuf.Duration.Builder getLifetimeBuilder() { + + onChanged(); + return getLifetimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * For convenience, the actual lifetime of an issued certificate.
+       * Corresponds to 'not_after_time' - 'not_before_time'.
+       * 
+ * + * .google.protobuf.Duration lifetime = 5; + */ + public com.google.protobuf.DurationOrBuilder getLifetimeOrBuilder() { + if (lifetimeBuilder_ != null) { + return lifetimeBuilder_.getMessageOrBuilder(); + } else { + return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_; + } + } + /** + * + * + *
+       * For convenience, the actual lifetime of an issued certificate.
+       * Corresponds to 'not_after_time' - 'not_before_time'.
+       * 
+ * + * .google.protobuf.Duration lifetime = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getLifetimeFieldBuilder() { + if (lifetimeBuilder_ == null) { + lifetimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getLifetime(), getParentForChildren(), isClean()); + lifetime_ = null; + } + return lifetimeBuilder_; + } + + private com.google.protobuf.Timestamp notBeforeTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + notBeforeTimeBuilder_; + /** + * + * + *
+       * The time at which the certificate becomes valid.
+       * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + * + * @return Whether the notBeforeTime field is set. + */ + public boolean hasNotBeforeTime() { + return notBeforeTimeBuilder_ != null || notBeforeTime_ != null; + } + /** + * + * + *
+       * The time at which the certificate becomes valid.
+       * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + * + * @return The notBeforeTime. + */ + public com.google.protobuf.Timestamp getNotBeforeTime() { + if (notBeforeTimeBuilder_ == null) { + return notBeforeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : notBeforeTime_; + } else { + return notBeforeTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The time at which the certificate becomes valid.
+       * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + */ + public Builder setNotBeforeTime(com.google.protobuf.Timestamp value) { + if (notBeforeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notBeforeTime_ = value; + onChanged(); + } else { + notBeforeTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The time at which the certificate becomes valid.
+       * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + */ + public Builder setNotBeforeTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (notBeforeTimeBuilder_ == null) { + notBeforeTime_ = builderForValue.build(); + onChanged(); + } else { + notBeforeTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The time at which the certificate becomes valid.
+       * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + */ + public Builder mergeNotBeforeTime(com.google.protobuf.Timestamp value) { + if (notBeforeTimeBuilder_ == null) { + if (notBeforeTime_ != null) { + notBeforeTime_ = + com.google.protobuf.Timestamp.newBuilder(notBeforeTime_) + .mergeFrom(value) + .buildPartial(); + } else { + notBeforeTime_ = value; + } + onChanged(); + } else { + notBeforeTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The time at which the certificate becomes valid.
+       * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + */ + public Builder clearNotBeforeTime() { + if (notBeforeTimeBuilder_ == null) { + notBeforeTime_ = null; + onChanged(); + } else { + notBeforeTime_ = null; + notBeforeTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The time at which the certificate becomes valid.
+       * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getNotBeforeTimeBuilder() { + + onChanged(); + return getNotBeforeTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The time at which the certificate becomes valid.
+       * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getNotBeforeTimeOrBuilder() { + if (notBeforeTimeBuilder_ != null) { + return notBeforeTimeBuilder_.getMessageOrBuilder(); + } else { + return notBeforeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : notBeforeTime_; + } + } + /** + * + * + *
+       * The time at which the certificate becomes valid.
+       * 
+ * + * .google.protobuf.Timestamp not_before_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getNotBeforeTimeFieldBuilder() { + if (notBeforeTimeBuilder_ == null) { + notBeforeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getNotBeforeTime(), getParentForChildren(), isClean()); + notBeforeTime_ = null; + } + return notBeforeTimeBuilder_; + } + + private com.google.protobuf.Timestamp notAfterTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + notAfterTimeBuilder_; + /** + * + * + *
+       * The time at which the certificate expires.
+       * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + * + * @return Whether the notAfterTime field is set. + */ + public boolean hasNotAfterTime() { + return notAfterTimeBuilder_ != null || notAfterTime_ != null; + } + /** + * + * + *
+       * The time at which the certificate expires.
+       * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + * + * @return The notAfterTime. + */ + public com.google.protobuf.Timestamp getNotAfterTime() { + if (notAfterTimeBuilder_ == null) { + return notAfterTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : notAfterTime_; + } else { + return notAfterTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The time at which the certificate expires.
+       * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + */ + public Builder setNotAfterTime(com.google.protobuf.Timestamp value) { + if (notAfterTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notAfterTime_ = value; + onChanged(); + } else { + notAfterTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The time at which the certificate expires.
+       * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + */ + public Builder setNotAfterTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (notAfterTimeBuilder_ == null) { + notAfterTime_ = builderForValue.build(); + onChanged(); + } else { + notAfterTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The time at which the certificate expires.
+       * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + */ + public Builder mergeNotAfterTime(com.google.protobuf.Timestamp value) { + if (notAfterTimeBuilder_ == null) { + if (notAfterTime_ != null) { + notAfterTime_ = + com.google.protobuf.Timestamp.newBuilder(notAfterTime_) + .mergeFrom(value) + .buildPartial(); + } else { + notAfterTime_ = value; + } + onChanged(); + } else { + notAfterTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The time at which the certificate expires.
+       * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + */ + public Builder clearNotAfterTime() { + if (notAfterTimeBuilder_ == null) { + notAfterTime_ = null; + onChanged(); + } else { + notAfterTime_ = null; + notAfterTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The time at which the certificate expires.
+       * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getNotAfterTimeBuilder() { + + onChanged(); + return getNotAfterTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The time at which the certificate expires.
+       * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getNotAfterTimeOrBuilder() { + if (notAfterTimeBuilder_ != null) { + return notAfterTimeBuilder_.getMessageOrBuilder(); + } else { + return notAfterTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : notAfterTime_; + } + } + /** + * + * + *
+       * The time at which the certificate expires.
+       * 
+ * + * .google.protobuf.Timestamp not_after_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getNotAfterTimeFieldBuilder() { + if (notAfterTimeBuilder_ == null) { + notAfterTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getNotAfterTime(), getParentForChildren(), isClean()); + notAfterTime_ = null; + } + return notAfterTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription) + private static final com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectDescription parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SubjectDescription(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KeyIdOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most
+     * likely the 160 bit SHA-1 hash of the public key.
+     * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The keyId. + */ + java.lang.String getKeyId(); + /** + * + * + *
+     * Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most
+     * likely the 160 bit SHA-1 hash of the public key.
+     * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for keyId. + */ + com.google.protobuf.ByteString getKeyIdBytes(); + } + /** + * + * + *
+   * A KeyId identifies a specific public key, usually by hashing the public
+   * key.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId} + */ + public static final class KeyId extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId) + KeyIdOrBuilder { + private static final long serialVersionUID = 0L; + // Use KeyId.newBuilder() to construct. + private KeyId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KeyId() { + keyId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KeyId(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private KeyId( + 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(); + + keyId_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_KeyId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_KeyId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.class, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder + .class); + } + + public static final int KEY_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object keyId_; + /** + * + * + *
+     * Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most
+     * likely the 160 bit SHA-1 hash of the public key.
+     * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The keyId. + */ + @java.lang.Override + public java.lang.String getKeyId() { + java.lang.Object ref = keyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyId_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most
+     * likely the 160 bit SHA-1 hash of the public key.
+     * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for keyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyIdBytes() { + java.lang.Object ref = keyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyId_ = 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 (!getKeyIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKeyIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId other = + (com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId) obj; + + if (!getKeyId().equals(other.getKeyId())) return false; + if (!unknownFields.equals(other.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) + KEY_ID_FIELD_NUMBER; + hash = (53 * hash) + getKeyId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 KeyId identifies a specific public key, usually by hashing the public
+     * key.
+     * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId) + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_KeyId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_KeyId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.class, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + keyId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_KeyId_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId build() { + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId result = + new com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId(this); + result.keyId_ = keyId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + .getDefaultInstance()) return this; + if (!other.getKeyId().isEmpty()) { + keyId_ = other.keyId_; + 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.security.privateca.v1beta1.CertificateDescription.KeyId parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object keyId_ = ""; + /** + * + * + *
+       * Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most
+       * likely the 160 bit SHA-1 hash of the public key.
+       * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The keyId. + */ + public java.lang.String getKeyId() { + java.lang.Object ref = keyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most
+       * likely the 160 bit SHA-1 hash of the public key.
+       * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for keyId. + */ + public com.google.protobuf.ByteString getKeyIdBytes() { + java.lang.Object ref = keyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most
+       * likely the 160 bit SHA-1 hash of the public key.
+       * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The keyId to set. + * @return This builder for chaining. + */ + public Builder setKeyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + keyId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most
+       * likely the 160 bit SHA-1 hash of the public key.
+       * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKeyId() { + + keyId_ = getDefaultInstance().getKeyId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most
+       * likely the 160 bit SHA-1 hash of the public key.
+       * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for keyId to set. + * @return This builder for chaining. + */ + public Builder setKeyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + keyId_ = 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.security.privateca.v1beta1.CertificateDescription.KeyId) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId) + private static final com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeyId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KeyId(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CertificateFingerprintOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
+     * 
+ * + * string sha256_hash = 1; + * + * @return The sha256Hash. + */ + java.lang.String getSha256Hash(); + /** + * + * + *
+     * The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
+     * 
+ * + * string sha256_hash = 1; + * + * @return The bytes for sha256Hash. + */ + com.google.protobuf.ByteString getSha256HashBytes(); + } + /** + * + * + *
+   * A group of fingerprints for the x509 certificate.
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint} + */ + public static final class CertificateFingerprint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint) + CertificateFingerprintOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateFingerprint.newBuilder() to construct. + private CertificateFingerprint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateFingerprint() { + sha256Hash_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateFingerprint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CertificateFingerprint( + 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(); + + sha256Hash_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_CertificateFingerprint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_CertificateFingerprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.class, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.Builder.class); + } + + public static final int SHA256_HASH_FIELD_NUMBER = 1; + private volatile java.lang.Object sha256Hash_; + /** + * + * + *
+     * The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
+     * 
+ * + * string sha256_hash = 1; + * + * @return The sha256Hash. + */ + @java.lang.Override + public java.lang.String getSha256Hash() { + java.lang.Object ref = sha256Hash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sha256Hash_ = s; + return s; + } + } + /** + * + * + *
+     * The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
+     * 
+ * + * string sha256_hash = 1; + * + * @return The bytes for sha256Hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSha256HashBytes() { + java.lang.Object ref = sha256Hash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sha256Hash_ = 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 (!getSha256HashBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sha256Hash_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSha256HashBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sha256Hash_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + other = + (com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint) + obj; + + if (!getSha256Hash().equals(other.getSha256Hash())) return false; + if (!unknownFields.equals(other.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) + SHA256_HASH_FIELD_NUMBER; + hash = (53 * hash) + getSha256Hash().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 group of fingerprints for the x509 certificate.
+     * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint) + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_CertificateFingerprint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_CertificateFingerprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.class, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + sha256Hash_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_CertificateFingerprint_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + build() { + com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + result = + new com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint(this); + result.sha256Hash_ = sha256Hash_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.getDefaultInstance()) return this; + if (!other.getSha256Hash().isEmpty()) { + sha256Hash_ = other.sha256Hash_; + 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.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object sha256Hash_ = ""; + /** + * + * + *
+       * The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
+       * 
+ * + * string sha256_hash = 1; + * + * @return The sha256Hash. + */ + public java.lang.String getSha256Hash() { + java.lang.Object ref = sha256Hash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sha256Hash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
+       * 
+ * + * string sha256_hash = 1; + * + * @return The bytes for sha256Hash. + */ + public com.google.protobuf.ByteString getSha256HashBytes() { + java.lang.Object ref = sha256Hash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sha256Hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
+       * 
+ * + * string sha256_hash = 1; + * + * @param value The sha256Hash to set. + * @return This builder for chaining. + */ + public Builder setSha256Hash(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sha256Hash_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
+       * 
+ * + * string sha256_hash = 1; + * + * @return This builder for chaining. + */ + public Builder clearSha256Hash() { + + sha256Hash_ = getDefaultInstance().getSha256Hash(); + onChanged(); + return this; + } + /** + * + * + *
+       * The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
+       * 
+ * + * string sha256_hash = 1; + * + * @param value The bytes for sha256Hash to set. + * @return This builder for chaining. + */ + public Builder setSha256HashBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sha256Hash_ = 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.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint) + private static final com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateFingerprint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CertificateFingerprint(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SUBJECT_DESCRIPTION_FIELD_NUMBER = 1; + private com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + subjectDescription_; + /** + * + * + *
+   * Describes some of the values in a certificate that are related to the
+   * subject and lifetime.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + * + * @return Whether the subjectDescription field is set. + */ + @java.lang.Override + public boolean hasSubjectDescription() { + return subjectDescription_ != null; + } + /** + * + * + *
+   * Describes some of the values in a certificate that are related to the
+   * subject and lifetime.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + * + * @return The subjectDescription. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + getSubjectDescription() { + return subjectDescription_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .getDefaultInstance() + : subjectDescription_; + } + /** + * + * + *
+   * Describes some of the values in a certificate that are related to the
+   * subject and lifetime.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescriptionOrBuilder + getSubjectDescriptionOrBuilder() { + return getSubjectDescription(); + } + + public static final int CONFIG_VALUES_FIELD_NUMBER = 2; + private com.google.cloud.security.privateca.v1beta1.ReusableConfigValues configValues_; + /** + * + * + *
+   * Describes some of the technical fields in a certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + * + * @return Whether the configValues field is set. + */ + @java.lang.Override + public boolean hasConfigValues() { + return configValues_ != null; + } + /** + * + * + *
+   * Describes some of the technical fields in a certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + * + * @return The configValues. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues getConfigValues() { + return configValues_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.getDefaultInstance() + : configValues_; + } + /** + * + * + *
+   * Describes some of the technical fields in a certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder + getConfigValuesOrBuilder() { + return getConfigValues(); + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 3; + private com.google.cloud.security.privateca.v1beta1.PublicKey publicKey_; + /** + * + * + *
+   * The public key that corresponds to an issued certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + * + * @return Whether the publicKey field is set. + */ + @java.lang.Override + public boolean hasPublicKey() { + return publicKey_ != null; + } + /** + * + * + *
+   * The public key that corresponds to an issued certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + * + * @return The publicKey. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.PublicKey getPublicKey() { + return publicKey_ == null + ? com.google.cloud.security.privateca.v1beta1.PublicKey.getDefaultInstance() + : publicKey_; + } + /** + * + * + *
+   * The public key that corresponds to an issued certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder getPublicKeyOrBuilder() { + return getPublicKey(); + } + + public static final int SUBJECT_KEY_ID_FIELD_NUMBER = 4; + private com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subjectKeyId_; + /** + * + * + *
+   * Provides a means of identifiying certificates that contain a particular
+   * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + * + * @return Whether the subjectKeyId field is set. + */ + @java.lang.Override + public boolean hasSubjectKeyId() { + return subjectKeyId_ != null; + } + /** + * + * + *
+   * Provides a means of identifiying certificates that contain a particular
+   * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + * + * @return The subjectKeyId. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + getSubjectKeyId() { + return subjectKeyId_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + .getDefaultInstance() + : subjectKeyId_; + } + /** + * + * + *
+   * Provides a means of identifiying certificates that contain a particular
+   * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder + getSubjectKeyIdOrBuilder() { + return getSubjectKeyId(); + } + + public static final int AUTHORITY_KEY_ID_FIELD_NUMBER = 5; + private com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authorityKeyId_; + /** + * + * + *
+   * Identifies the subject_key_id of the parent certificate, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + * + * @return Whether the authorityKeyId field is set. + */ + @java.lang.Override + public boolean hasAuthorityKeyId() { + return authorityKeyId_ != null; + } + /** + * + * + *
+   * Identifies the subject_key_id of the parent certificate, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + * + * @return The authorityKeyId. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + getAuthorityKeyId() { + return authorityKeyId_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + .getDefaultInstance() + : authorityKeyId_; + } + /** + * + * + *
+   * Identifies the subject_key_id of the parent certificate, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder + getAuthorityKeyIdOrBuilder() { + return getAuthorityKeyId(); + } + + public static final int CRL_DISTRIBUTION_POINTS_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList crlDistributionPoints_; + /** + * + * + *
+   * Describes a list of locations to obtain CRL information, i.e.
+   * the DistributionPoint.fullName described by
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+   * 
+ * + * repeated string crl_distribution_points = 6; + * + * @return A list containing the crlDistributionPoints. + */ + public com.google.protobuf.ProtocolStringList getCrlDistributionPointsList() { + return crlDistributionPoints_; + } + /** + * + * + *
+   * Describes a list of locations to obtain CRL information, i.e.
+   * the DistributionPoint.fullName described by
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+   * 
+ * + * repeated string crl_distribution_points = 6; + * + * @return The count of crlDistributionPoints. + */ + public int getCrlDistributionPointsCount() { + return crlDistributionPoints_.size(); + } + /** + * + * + *
+   * Describes a list of locations to obtain CRL information, i.e.
+   * the DistributionPoint.fullName described by
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+   * 
+ * + * repeated string crl_distribution_points = 6; + * + * @param index The index of the element to return. + * @return The crlDistributionPoints at the given index. + */ + public java.lang.String getCrlDistributionPoints(int index) { + return crlDistributionPoints_.get(index); + } + /** + * + * + *
+   * Describes a list of locations to obtain CRL information, i.e.
+   * the DistributionPoint.fullName described by
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+   * 
+ * + * repeated string crl_distribution_points = 6; + * + * @param index The index of the value to return. + * @return The bytes of the crlDistributionPoints at the given index. + */ + public com.google.protobuf.ByteString getCrlDistributionPointsBytes(int index) { + return crlDistributionPoints_.getByteString(index); + } + + public static final int AIA_ISSUING_CERTIFICATE_URLS_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList aiaIssuingCertificateUrls_; + /** + * + * + *
+   * Describes lists of issuer CA certificate URLs that appear in the
+   * "Authority Information Access" extension in the certificate.
+   * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @return A list containing the aiaIssuingCertificateUrls. + */ + public com.google.protobuf.ProtocolStringList getAiaIssuingCertificateUrlsList() { + return aiaIssuingCertificateUrls_; + } + /** + * + * + *
+   * Describes lists of issuer CA certificate URLs that appear in the
+   * "Authority Information Access" extension in the certificate.
+   * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @return The count of aiaIssuingCertificateUrls. + */ + public int getAiaIssuingCertificateUrlsCount() { + return aiaIssuingCertificateUrls_.size(); + } + /** + * + * + *
+   * Describes lists of issuer CA certificate URLs that appear in the
+   * "Authority Information Access" extension in the certificate.
+   * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @param index The index of the element to return. + * @return The aiaIssuingCertificateUrls at the given index. + */ + public java.lang.String getAiaIssuingCertificateUrls(int index) { + return aiaIssuingCertificateUrls_.get(index); + } + /** + * + * + *
+   * Describes lists of issuer CA certificate URLs that appear in the
+   * "Authority Information Access" extension in the certificate.
+   * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @param index The index of the value to return. + * @return The bytes of the aiaIssuingCertificateUrls at the given index. + */ + public com.google.protobuf.ByteString getAiaIssuingCertificateUrlsBytes(int index) { + return aiaIssuingCertificateUrls_.getByteString(index); + } + + public static final int CERT_FINGERPRINT_FIELD_NUMBER = 8; + private com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + certFingerprint_; + /** + * + * + *
+   * The hash of the x.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + * + * @return Whether the certFingerprint field is set. + */ + @java.lang.Override + public boolean hasCertFingerprint() { + return certFingerprint_ != null; + } + /** + * + * + *
+   * The hash of the x.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + * + * @return The certFingerprint. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + getCertFingerprint() { + return certFingerprint_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + .getDefaultInstance() + : certFingerprint_; + } + /** + * + * + *
+   * The hash of the x.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprintOrBuilder + getCertFingerprintOrBuilder() { + return getCertFingerprint(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subjectDescription_ != null) { + output.writeMessage(1, getSubjectDescription()); + } + if (configValues_ != null) { + output.writeMessage(2, getConfigValues()); + } + if (publicKey_ != null) { + output.writeMessage(3, getPublicKey()); + } + if (subjectKeyId_ != null) { + output.writeMessage(4, getSubjectKeyId()); + } + if (authorityKeyId_ != null) { + output.writeMessage(5, getAuthorityKeyId()); + } + for (int i = 0; i < crlDistributionPoints_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 6, crlDistributionPoints_.getRaw(i)); + } + for (int i = 0; i < aiaIssuingCertificateUrls_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 7, aiaIssuingCertificateUrls_.getRaw(i)); + } + if (certFingerprint_ != null) { + output.writeMessage(8, getCertFingerprint()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (subjectDescription_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubjectDescription()); + } + if (configValues_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConfigValues()); + } + if (publicKey_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPublicKey()); + } + if (subjectKeyId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSubjectKeyId()); + } + if (authorityKeyId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAuthorityKeyId()); + } + { + int dataSize = 0; + for (int i = 0; i < crlDistributionPoints_.size(); i++) { + dataSize += computeStringSizeNoTag(crlDistributionPoints_.getRaw(i)); + } + size += dataSize; + size += 1 * getCrlDistributionPointsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < aiaIssuingCertificateUrls_.size(); i++) { + dataSize += computeStringSizeNoTag(aiaIssuingCertificateUrls_.getRaw(i)); + } + size += dataSize; + size += 1 * getAiaIssuingCertificateUrlsList().size(); + } + if (certFingerprint_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCertFingerprint()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.CertificateDescription)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateDescription other = + (com.google.cloud.security.privateca.v1beta1.CertificateDescription) obj; + + if (hasSubjectDescription() != other.hasSubjectDescription()) return false; + if (hasSubjectDescription()) { + if (!getSubjectDescription().equals(other.getSubjectDescription())) return false; + } + if (hasConfigValues() != other.hasConfigValues()) return false; + if (hasConfigValues()) { + if (!getConfigValues().equals(other.getConfigValues())) return false; + } + if (hasPublicKey() != other.hasPublicKey()) return false; + if (hasPublicKey()) { + if (!getPublicKey().equals(other.getPublicKey())) return false; + } + if (hasSubjectKeyId() != other.hasSubjectKeyId()) return false; + if (hasSubjectKeyId()) { + if (!getSubjectKeyId().equals(other.getSubjectKeyId())) return false; + } + if (hasAuthorityKeyId() != other.hasAuthorityKeyId()) return false; + if (hasAuthorityKeyId()) { + if (!getAuthorityKeyId().equals(other.getAuthorityKeyId())) return false; + } + if (!getCrlDistributionPointsList().equals(other.getCrlDistributionPointsList())) return false; + if (!getAiaIssuingCertificateUrlsList().equals(other.getAiaIssuingCertificateUrlsList())) + return false; + if (hasCertFingerprint() != other.hasCertFingerprint()) return false; + if (hasCertFingerprint()) { + if (!getCertFingerprint().equals(other.getCertFingerprint())) return false; + } + if (!unknownFields.equals(other.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 (hasSubjectDescription()) { + hash = (37 * hash) + SUBJECT_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getSubjectDescription().hashCode(); + } + if (hasConfigValues()) { + hash = (37 * hash) + CONFIG_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getConfigValues().hashCode(); + } + if (hasPublicKey()) { + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + } + if (hasSubjectKeyId()) { + hash = (37 * hash) + SUBJECT_KEY_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubjectKeyId().hashCode(); + } + if (hasAuthorityKeyId()) { + hash = (37 * hash) + AUTHORITY_KEY_ID_FIELD_NUMBER; + hash = (53 * hash) + getAuthorityKeyId().hashCode(); + } + if (getCrlDistributionPointsCount() > 0) { + hash = (37 * hash) + CRL_DISTRIBUTION_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getCrlDistributionPointsList().hashCode(); + } + if (getAiaIssuingCertificateUrlsCount() > 0) { + hash = (37 * hash) + AIA_ISSUING_CERTIFICATE_URLS_FIELD_NUMBER; + hash = (53 * hash) + getAiaIssuingCertificateUrlsList().hashCode(); + } + if (hasCertFingerprint()) { + hash = (37 * hash) + CERT_FINGERPRINT_FIELD_NUMBER; + hash = (53 * hash) + getCertFingerprint().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateDescription prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CertificateDescription][google.cloud.security.privateca.v1beta1.CertificateDescription] describes an X.509 certificate or CSR that has
+   * been issued, as an alternative to using ASN.1 / X.509.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateDescription} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateDescription) + com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.class, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateDescription.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (subjectDescriptionBuilder_ == null) { + subjectDescription_ = null; + } else { + subjectDescription_ = null; + subjectDescriptionBuilder_ = null; + } + if (configValuesBuilder_ == null) { + configValues_ = null; + } else { + configValues_ = null; + configValuesBuilder_ = null; + } + if (publicKeyBuilder_ == null) { + publicKey_ = null; + } else { + publicKey_ = null; + publicKeyBuilder_ = null; + } + if (subjectKeyIdBuilder_ == null) { + subjectKeyId_ = null; + } else { + subjectKeyId_ = null; + subjectKeyIdBuilder_ = null; + } + if (authorityKeyIdBuilder_ == null) { + authorityKeyId_ = null; + } else { + authorityKeyId_ = null; + authorityKeyIdBuilder_ = null; + } + crlDistributionPoints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + aiaIssuingCertificateUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (certFingerprintBuilder_ == null) { + certFingerprint_ = null; + } else { + certFingerprint_ = null; + certFingerprintBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateDescription + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription build() { + com.google.cloud.security.privateca.v1beta1.CertificateDescription result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateDescription result = + new com.google.cloud.security.privateca.v1beta1.CertificateDescription(this); + int from_bitField0_ = bitField0_; + if (subjectDescriptionBuilder_ == null) { + result.subjectDescription_ = subjectDescription_; + } else { + result.subjectDescription_ = subjectDescriptionBuilder_.build(); + } + if (configValuesBuilder_ == null) { + result.configValues_ = configValues_; + } else { + result.configValues_ = configValuesBuilder_.build(); + } + if (publicKeyBuilder_ == null) { + result.publicKey_ = publicKey_; + } else { + result.publicKey_ = publicKeyBuilder_.build(); + } + if (subjectKeyIdBuilder_ == null) { + result.subjectKeyId_ = subjectKeyId_; + } else { + result.subjectKeyId_ = subjectKeyIdBuilder_.build(); + } + if (authorityKeyIdBuilder_ == null) { + result.authorityKeyId_ = authorityKeyId_; + } else { + result.authorityKeyId_ = authorityKeyIdBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + crlDistributionPoints_ = crlDistributionPoints_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.crlDistributionPoints_ = crlDistributionPoints_; + if (((bitField0_ & 0x00000002) != 0)) { + aiaIssuingCertificateUrls_ = aiaIssuingCertificateUrls_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.aiaIssuingCertificateUrls_ = aiaIssuingCertificateUrls_; + if (certFingerprintBuilder_ == null) { + result.certFingerprint_ = certFingerprint_; + } else { + result.certFingerprint_ = certFingerprintBuilder_.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.security.privateca.v1beta1.CertificateDescription) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateDescription) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateDescription other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateDescription + .getDefaultInstance()) return this; + if (other.hasSubjectDescription()) { + mergeSubjectDescription(other.getSubjectDescription()); + } + if (other.hasConfigValues()) { + mergeConfigValues(other.getConfigValues()); + } + if (other.hasPublicKey()) { + mergePublicKey(other.getPublicKey()); + } + if (other.hasSubjectKeyId()) { + mergeSubjectKeyId(other.getSubjectKeyId()); + } + if (other.hasAuthorityKeyId()) { + mergeAuthorityKeyId(other.getAuthorityKeyId()); + } + if (!other.crlDistributionPoints_.isEmpty()) { + if (crlDistributionPoints_.isEmpty()) { + crlDistributionPoints_ = other.crlDistributionPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCrlDistributionPointsIsMutable(); + crlDistributionPoints_.addAll(other.crlDistributionPoints_); + } + onChanged(); + } + if (!other.aiaIssuingCertificateUrls_.isEmpty()) { + if (aiaIssuingCertificateUrls_.isEmpty()) { + aiaIssuingCertificateUrls_ = other.aiaIssuingCertificateUrls_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAiaIssuingCertificateUrlsIsMutable(); + aiaIssuingCertificateUrls_.addAll(other.aiaIssuingCertificateUrls_); + } + onChanged(); + } + if (other.hasCertFingerprint()) { + mergeCertFingerprint(other.getCertFingerprint()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.CertificateDescription parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateDescription) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + subjectDescription_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescriptionOrBuilder> + subjectDescriptionBuilder_; + /** + * + * + *
+     * Describes some of the values in a certificate that are related to the
+     * subject and lifetime.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + * + * @return Whether the subjectDescription field is set. + */ + public boolean hasSubjectDescription() { + return subjectDescriptionBuilder_ != null || subjectDescription_ != null; + } + /** + * + * + *
+     * Describes some of the values in a certificate that are related to the
+     * subject and lifetime.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + * + * @return The subjectDescription. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + getSubjectDescription() { + if (subjectDescriptionBuilder_ == null) { + return subjectDescription_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .getDefaultInstance() + : subjectDescription_; + } else { + return subjectDescriptionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Describes some of the values in a certificate that are related to the
+     * subject and lifetime.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + */ + public Builder setSubjectDescription( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + value) { + if (subjectDescriptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectDescription_ = value; + onChanged(); + } else { + subjectDescriptionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Describes some of the values in a certificate that are related to the
+     * subject and lifetime.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + */ + public Builder setSubjectDescription( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .Builder + builderForValue) { + if (subjectDescriptionBuilder_ == null) { + subjectDescription_ = builderForValue.build(); + onChanged(); + } else { + subjectDescriptionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Describes some of the values in a certificate that are related to the
+     * subject and lifetime.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + */ + public Builder mergeSubjectDescription( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + value) { + if (subjectDescriptionBuilder_ == null) { + if (subjectDescription_ != null) { + subjectDescription_ = + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .newBuilder(subjectDescription_) + .mergeFrom(value) + .buildPartial(); + } else { + subjectDescription_ = value; + } + onChanged(); + } else { + subjectDescriptionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Describes some of the values in a certificate that are related to the
+     * subject and lifetime.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + */ + public Builder clearSubjectDescription() { + if (subjectDescriptionBuilder_ == null) { + subjectDescription_ = null; + onChanged(); + } else { + subjectDescription_ = null; + subjectDescriptionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Describes some of the values in a certificate that are related to the
+     * subject and lifetime.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .Builder + getSubjectDescriptionBuilder() { + + onChanged(); + return getSubjectDescriptionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Describes some of the values in a certificate that are related to the
+     * subject and lifetime.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescriptionOrBuilder + getSubjectDescriptionOrBuilder() { + if (subjectDescriptionBuilder_ != null) { + return subjectDescriptionBuilder_.getMessageOrBuilder(); + } else { + return subjectDescription_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .getDefaultInstance() + : subjectDescription_; + } + } + /** + * + * + *
+     * Describes some of the values in a certificate that are related to the
+     * subject and lifetime.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + .Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescriptionOrBuilder> + getSubjectDescriptionFieldBuilder() { + if (subjectDescriptionBuilder_ == null) { + subjectDescriptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescription.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .SubjectDescriptionOrBuilder>( + getSubjectDescription(), getParentForChildren(), isClean()); + subjectDescription_ = null; + } + return subjectDescriptionBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.ReusableConfigValues configValues_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder> + configValuesBuilder_; + /** + * + * + *
+     * Describes some of the technical fields in a certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + * + * @return Whether the configValues field is set. + */ + public boolean hasConfigValues() { + return configValuesBuilder_ != null || configValues_ != null; + } + /** + * + * + *
+     * Describes some of the technical fields in a certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + * + * @return The configValues. + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues getConfigValues() { + if (configValuesBuilder_ == null) { + return configValues_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.getDefaultInstance() + : configValues_; + } else { + return configValuesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Describes some of the technical fields in a certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + */ + public Builder setConfigValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues value) { + if (configValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configValues_ = value; + onChanged(); + } else { + configValuesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Describes some of the technical fields in a certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + */ + public Builder setConfigValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder builderForValue) { + if (configValuesBuilder_ == null) { + configValues_ = builderForValue.build(); + onChanged(); + } else { + configValuesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Describes some of the technical fields in a certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + */ + public Builder mergeConfigValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues value) { + if (configValuesBuilder_ == null) { + if (configValues_ != null) { + configValues_ = + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.newBuilder( + configValues_) + .mergeFrom(value) + .buildPartial(); + } else { + configValues_ = value; + } + onChanged(); + } else { + configValuesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Describes some of the technical fields in a certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + */ + public Builder clearConfigValues() { + if (configValuesBuilder_ == null) { + configValues_ = null; + onChanged(); + } else { + configValues_ = null; + configValuesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Describes some of the technical fields in a certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder + getConfigValuesBuilder() { + + onChanged(); + return getConfigValuesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Describes some of the technical fields in a certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder + getConfigValuesOrBuilder() { + if (configValuesBuilder_ != null) { + return configValuesBuilder_.getMessageOrBuilder(); + } else { + return configValues_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.getDefaultInstance() + : configValues_; + } + } + /** + * + * + *
+     * Describes some of the technical fields in a certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder> + getConfigValuesFieldBuilder() { + if (configValuesBuilder_ == null) { + configValuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder>( + getConfigValues(), getParentForChildren(), isClean()); + configValues_ = null; + } + return configValuesBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.PublicKey publicKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.PublicKey, + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder, + com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder> + publicKeyBuilder_; + /** + * + * + *
+     * The public key that corresponds to an issued certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + * + * @return Whether the publicKey field is set. + */ + public boolean hasPublicKey() { + return publicKeyBuilder_ != null || publicKey_ != null; + } + /** + * + * + *
+     * The public key that corresponds to an issued certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + * + * @return The publicKey. + */ + public com.google.cloud.security.privateca.v1beta1.PublicKey getPublicKey() { + if (publicKeyBuilder_ == null) { + return publicKey_ == null + ? com.google.cloud.security.privateca.v1beta1.PublicKey.getDefaultInstance() + : publicKey_; + } else { + return publicKeyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The public key that corresponds to an issued certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + */ + public Builder setPublicKey(com.google.cloud.security.privateca.v1beta1.PublicKey value) { + if (publicKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publicKey_ = value; + onChanged(); + } else { + publicKeyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The public key that corresponds to an issued certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + */ + public Builder setPublicKey( + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder builderForValue) { + if (publicKeyBuilder_ == null) { + publicKey_ = builderForValue.build(); + onChanged(); + } else { + publicKeyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The public key that corresponds to an issued certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + */ + public Builder mergePublicKey(com.google.cloud.security.privateca.v1beta1.PublicKey value) { + if (publicKeyBuilder_ == null) { + if (publicKey_ != null) { + publicKey_ = + com.google.cloud.security.privateca.v1beta1.PublicKey.newBuilder(publicKey_) + .mergeFrom(value) + .buildPartial(); + } else { + publicKey_ = value; + } + onChanged(); + } else { + publicKeyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The public key that corresponds to an issued certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + */ + public Builder clearPublicKey() { + if (publicKeyBuilder_ == null) { + publicKey_ = null; + onChanged(); + } else { + publicKey_ = null; + publicKeyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The public key that corresponds to an issued certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + */ + public com.google.cloud.security.privateca.v1beta1.PublicKey.Builder getPublicKeyBuilder() { + + onChanged(); + return getPublicKeyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The public key that corresponds to an issued certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + */ + public com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder getPublicKeyOrBuilder() { + if (publicKeyBuilder_ != null) { + return publicKeyBuilder_.getMessageOrBuilder(); + } else { + return publicKey_ == null + ? com.google.cloud.security.privateca.v1beta1.PublicKey.getDefaultInstance() + : publicKey_; + } + } + /** + * + * + *
+     * The public key that corresponds to an issued certificate.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.PublicKey, + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder, + com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder> + getPublicKeyFieldBuilder() { + if (publicKeyBuilder_ == null) { + publicKeyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.PublicKey, + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder, + com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder>( + getPublicKey(), getParentForChildren(), isClean()); + publicKey_ = null; + } + return publicKeyBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subjectKeyId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder> + subjectKeyIdBuilder_; + /** + * + * + *
+     * Provides a means of identifiying certificates that contain a particular
+     * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + * + * @return Whether the subjectKeyId field is set. + */ + public boolean hasSubjectKeyId() { + return subjectKeyIdBuilder_ != null || subjectKeyId_ != null; + } + /** + * + * + *
+     * Provides a means of identifiying certificates that contain a particular
+     * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + * + * @return The subjectKeyId. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + getSubjectKeyId() { + if (subjectKeyIdBuilder_ == null) { + return subjectKeyId_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + .getDefaultInstance() + : subjectKeyId_; + } else { + return subjectKeyIdBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Provides a means of identifiying certificates that contain a particular
+     * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + */ + public Builder setSubjectKeyId( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId value) { + if (subjectKeyIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectKeyId_ = value; + onChanged(); + } else { + subjectKeyIdBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Provides a means of identifiying certificates that contain a particular
+     * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + */ + public Builder setSubjectKeyId( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder + builderForValue) { + if (subjectKeyIdBuilder_ == null) { + subjectKeyId_ = builderForValue.build(); + onChanged(); + } else { + subjectKeyIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Provides a means of identifiying certificates that contain a particular
+     * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + */ + public Builder mergeSubjectKeyId( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId value) { + if (subjectKeyIdBuilder_ == null) { + if (subjectKeyId_ != null) { + subjectKeyId_ = + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.newBuilder( + subjectKeyId_) + .mergeFrom(value) + .buildPartial(); + } else { + subjectKeyId_ = value; + } + onChanged(); + } else { + subjectKeyIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Provides a means of identifiying certificates that contain a particular
+     * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + */ + public Builder clearSubjectKeyId() { + if (subjectKeyIdBuilder_ == null) { + subjectKeyId_ = null; + onChanged(); + } else { + subjectKeyId_ = null; + subjectKeyIdBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Provides a means of identifiying certificates that contain a particular
+     * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder + getSubjectKeyIdBuilder() { + + onChanged(); + return getSubjectKeyIdFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Provides a means of identifiying certificates that contain a particular
+     * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder + getSubjectKeyIdOrBuilder() { + if (subjectKeyIdBuilder_ != null) { + return subjectKeyIdBuilder_.getMessageOrBuilder(); + } else { + return subjectKeyId_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + .getDefaultInstance() + : subjectKeyId_; + } + } + /** + * + * + *
+     * Provides a means of identifiying certificates that contain a particular
+     * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder> + getSubjectKeyIdFieldBuilder() { + if (subjectKeyIdBuilder_ == null) { + subjectKeyIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder>( + getSubjectKeyId(), getParentForChildren(), isClean()); + subjectKeyId_ = null; + } + return subjectKeyIdBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + authorityKeyId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder> + authorityKeyIdBuilder_; + /** + * + * + *
+     * Identifies the subject_key_id of the parent certificate, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + * + * @return Whether the authorityKeyId field is set. + */ + public boolean hasAuthorityKeyId() { + return authorityKeyIdBuilder_ != null || authorityKeyId_ != null; + } + /** + * + * + *
+     * Identifies the subject_key_id of the parent certificate, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + * + * @return The authorityKeyId. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + getAuthorityKeyId() { + if (authorityKeyIdBuilder_ == null) { + return authorityKeyId_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + .getDefaultInstance() + : authorityKeyId_; + } else { + return authorityKeyIdBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Identifies the subject_key_id of the parent certificate, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + */ + public Builder setAuthorityKeyId( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId value) { + if (authorityKeyIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorityKeyId_ = value; + onChanged(); + } else { + authorityKeyIdBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Identifies the subject_key_id of the parent certificate, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + */ + public Builder setAuthorityKeyId( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder + builderForValue) { + if (authorityKeyIdBuilder_ == null) { + authorityKeyId_ = builderForValue.build(); + onChanged(); + } else { + authorityKeyIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Identifies the subject_key_id of the parent certificate, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + */ + public Builder mergeAuthorityKeyId( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId value) { + if (authorityKeyIdBuilder_ == null) { + if (authorityKeyId_ != null) { + authorityKeyId_ = + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.newBuilder( + authorityKeyId_) + .mergeFrom(value) + .buildPartial(); + } else { + authorityKeyId_ = value; + } + onChanged(); + } else { + authorityKeyIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Identifies the subject_key_id of the parent certificate, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + */ + public Builder clearAuthorityKeyId() { + if (authorityKeyIdBuilder_ == null) { + authorityKeyId_ = null; + onChanged(); + } else { + authorityKeyId_ = null; + authorityKeyIdBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Identifies the subject_key_id of the parent certificate, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder + getAuthorityKeyIdBuilder() { + + onChanged(); + return getAuthorityKeyIdFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Identifies the subject_key_id of the parent certificate, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder + getAuthorityKeyIdOrBuilder() { + if (authorityKeyIdBuilder_ != null) { + return authorityKeyIdBuilder_.getMessageOrBuilder(); + } else { + return authorityKeyId_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + .getDefaultInstance() + : authorityKeyId_; + } + } + /** + * + * + *
+     * Identifies the subject_key_id of the parent certificate, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder> + getAuthorityKeyIdFieldBuilder() { + if (authorityKeyIdBuilder_ == null) { + authorityKeyIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder>( + getAuthorityKeyId(), getParentForChildren(), isClean()); + authorityKeyId_ = null; + } + return authorityKeyIdBuilder_; + } + + private com.google.protobuf.LazyStringList crlDistributionPoints_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCrlDistributionPointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + crlDistributionPoints_ = + new com.google.protobuf.LazyStringArrayList(crlDistributionPoints_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Describes a list of locations to obtain CRL information, i.e.
+     * the DistributionPoint.fullName described by
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+     * 
+ * + * repeated string crl_distribution_points = 6; + * + * @return A list containing the crlDistributionPoints. + */ + public com.google.protobuf.ProtocolStringList getCrlDistributionPointsList() { + return crlDistributionPoints_.getUnmodifiableView(); + } + /** + * + * + *
+     * Describes a list of locations to obtain CRL information, i.e.
+     * the DistributionPoint.fullName described by
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+     * 
+ * + * repeated string crl_distribution_points = 6; + * + * @return The count of crlDistributionPoints. + */ + public int getCrlDistributionPointsCount() { + return crlDistributionPoints_.size(); + } + /** + * + * + *
+     * Describes a list of locations to obtain CRL information, i.e.
+     * the DistributionPoint.fullName described by
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+     * 
+ * + * repeated string crl_distribution_points = 6; + * + * @param index The index of the element to return. + * @return The crlDistributionPoints at the given index. + */ + public java.lang.String getCrlDistributionPoints(int index) { + return crlDistributionPoints_.get(index); + } + /** + * + * + *
+     * Describes a list of locations to obtain CRL information, i.e.
+     * the DistributionPoint.fullName described by
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+     * 
+ * + * repeated string crl_distribution_points = 6; + * + * @param index The index of the value to return. + * @return The bytes of the crlDistributionPoints at the given index. + */ + public com.google.protobuf.ByteString getCrlDistributionPointsBytes(int index) { + return crlDistributionPoints_.getByteString(index); + } + /** + * + * + *
+     * Describes a list of locations to obtain CRL information, i.e.
+     * the DistributionPoint.fullName described by
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+     * 
+ * + * repeated string crl_distribution_points = 6; + * + * @param index The index to set the value at. + * @param value The crlDistributionPoints to set. + * @return This builder for chaining. + */ + public Builder setCrlDistributionPoints(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCrlDistributionPointsIsMutable(); + crlDistributionPoints_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes a list of locations to obtain CRL information, i.e.
+     * the DistributionPoint.fullName described by
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+     * 
+ * + * repeated string crl_distribution_points = 6; + * + * @param value The crlDistributionPoints to add. + * @return This builder for chaining. + */ + public Builder addCrlDistributionPoints(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCrlDistributionPointsIsMutable(); + crlDistributionPoints_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes a list of locations to obtain CRL information, i.e.
+     * the DistributionPoint.fullName described by
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+     * 
+ * + * repeated string crl_distribution_points = 6; + * + * @param values The crlDistributionPoints to add. + * @return This builder for chaining. + */ + public Builder addAllCrlDistributionPoints(java.lang.Iterable values) { + ensureCrlDistributionPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, crlDistributionPoints_); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes a list of locations to obtain CRL information, i.e.
+     * the DistributionPoint.fullName described by
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+     * 
+ * + * repeated string crl_distribution_points = 6; + * + * @return This builder for chaining. + */ + public Builder clearCrlDistributionPoints() { + crlDistributionPoints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes a list of locations to obtain CRL information, i.e.
+     * the DistributionPoint.fullName described by
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+     * 
+ * + * repeated string crl_distribution_points = 6; + * + * @param value The bytes of the crlDistributionPoints to add. + * @return This builder for chaining. + */ + public Builder addCrlDistributionPointsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCrlDistributionPointsIsMutable(); + crlDistributionPoints_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList aiaIssuingCertificateUrls_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAiaIssuingCertificateUrlsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + aiaIssuingCertificateUrls_ = + new com.google.protobuf.LazyStringArrayList(aiaIssuingCertificateUrls_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Describes lists of issuer CA certificate URLs that appear in the
+     * "Authority Information Access" extension in the certificate.
+     * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @return A list containing the aiaIssuingCertificateUrls. + */ + public com.google.protobuf.ProtocolStringList getAiaIssuingCertificateUrlsList() { + return aiaIssuingCertificateUrls_.getUnmodifiableView(); + } + /** + * + * + *
+     * Describes lists of issuer CA certificate URLs that appear in the
+     * "Authority Information Access" extension in the certificate.
+     * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @return The count of aiaIssuingCertificateUrls. + */ + public int getAiaIssuingCertificateUrlsCount() { + return aiaIssuingCertificateUrls_.size(); + } + /** + * + * + *
+     * Describes lists of issuer CA certificate URLs that appear in the
+     * "Authority Information Access" extension in the certificate.
+     * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @param index The index of the element to return. + * @return The aiaIssuingCertificateUrls at the given index. + */ + public java.lang.String getAiaIssuingCertificateUrls(int index) { + return aiaIssuingCertificateUrls_.get(index); + } + /** + * + * + *
+     * Describes lists of issuer CA certificate URLs that appear in the
+     * "Authority Information Access" extension in the certificate.
+     * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @param index The index of the value to return. + * @return The bytes of the aiaIssuingCertificateUrls at the given index. + */ + public com.google.protobuf.ByteString getAiaIssuingCertificateUrlsBytes(int index) { + return aiaIssuingCertificateUrls_.getByteString(index); + } + /** + * + * + *
+     * Describes lists of issuer CA certificate URLs that appear in the
+     * "Authority Information Access" extension in the certificate.
+     * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @param index The index to set the value at. + * @param value The aiaIssuingCertificateUrls to set. + * @return This builder for chaining. + */ + public Builder setAiaIssuingCertificateUrls(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAiaIssuingCertificateUrlsIsMutable(); + aiaIssuingCertificateUrls_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes lists of issuer CA certificate URLs that appear in the
+     * "Authority Information Access" extension in the certificate.
+     * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @param value The aiaIssuingCertificateUrls to add. + * @return This builder for chaining. + */ + public Builder addAiaIssuingCertificateUrls(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAiaIssuingCertificateUrlsIsMutable(); + aiaIssuingCertificateUrls_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes lists of issuer CA certificate URLs that appear in the
+     * "Authority Information Access" extension in the certificate.
+     * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @param values The aiaIssuingCertificateUrls to add. + * @return This builder for chaining. + */ + public Builder addAllAiaIssuingCertificateUrls(java.lang.Iterable values) { + ensureAiaIssuingCertificateUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, aiaIssuingCertificateUrls_); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes lists of issuer CA certificate URLs that appear in the
+     * "Authority Information Access" extension in the certificate.
+     * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @return This builder for chaining. + */ + public Builder clearAiaIssuingCertificateUrls() { + aiaIssuingCertificateUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes lists of issuer CA certificate URLs that appear in the
+     * "Authority Information Access" extension in the certificate.
+     * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @param value The bytes of the aiaIssuingCertificateUrls to add. + * @return This builder for chaining. + */ + public Builder addAiaIssuingCertificateUrlsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAiaIssuingCertificateUrlsIsMutable(); + aiaIssuingCertificateUrls_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint + certFingerprint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprintOrBuilder> + certFingerprintBuilder_; + /** + * + * + *
+     * The hash of the x.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + * + * @return Whether the certFingerprint field is set. + */ + public boolean hasCertFingerprint() { + return certFingerprintBuilder_ != null || certFingerprint_ != null; + } + /** + * + * + *
+     * The hash of the x.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + * + * @return The certFingerprint. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + getCertFingerprint() { + if (certFingerprintBuilder_ == null) { + return certFingerprint_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.getDefaultInstance() + : certFingerprint_; + } else { + return certFingerprintBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The hash of the x.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + */ + public Builder setCertFingerprint( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + value) { + if (certFingerprintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certFingerprint_ = value; + onChanged(); + } else { + certFingerprintBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The hash of the x.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + */ + public Builder setCertFingerprint( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + .Builder + builderForValue) { + if (certFingerprintBuilder_ == null) { + certFingerprint_ = builderForValue.build(); + onChanged(); + } else { + certFingerprintBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The hash of the x.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + */ + public Builder mergeCertFingerprint( + com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + value) { + if (certFingerprintBuilder_ == null) { + if (certFingerprint_ != null) { + certFingerprint_ = + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.newBuilder(certFingerprint_) + .mergeFrom(value) + .buildPartial(); + } else { + certFingerprint_ = value; + } + onChanged(); + } else { + certFingerprintBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The hash of the x.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + */ + public Builder clearCertFingerprint() { + if (certFingerprintBuilder_ == null) { + certFingerprint_ = null; + onChanged(); + } else { + certFingerprint_ = null; + certFingerprintBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The hash of the x.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + .Builder + getCertFingerprintBuilder() { + + onChanged(); + return getCertFingerprintFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The hash of the x.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprintOrBuilder + getCertFingerprintOrBuilder() { + if (certFingerprintBuilder_ != null) { + return certFingerprintBuilder_.getMessageOrBuilder(); + } else { + return certFingerprint_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.getDefaultInstance() + : certFingerprint_; + } + } + /** + * + * + *
+     * The hash of the x.509 certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprintOrBuilder> + getCertFingerprintFieldBuilder() { + if (certFingerprintBuilder_ == null) { + certFingerprintBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprint.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateDescription + .CertificateFingerprintOrBuilder>( + getCertFingerprint(), getParentForChildren(), isClean()); + certFingerprint_ = null; + } + return certFingerprintBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CertificateDescription) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateDescription) + private static final com.google.cloud.security.privateca.v1beta1.CertificateDescription + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.CertificateDescription(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateDescription + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateDescription parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CertificateDescription(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateDescription + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateDescriptionOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateDescriptionOrBuilder.java new file mode 100644 index 00000000..005c90e7 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateDescriptionOrBuilder.java @@ -0,0 +1,386 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface CertificateDescriptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateDescription) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Describes some of the values in a certificate that are related to the
+   * subject and lifetime.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + * + * @return Whether the subjectDescription field is set. + */ + boolean hasSubjectDescription(); + /** + * + * + *
+   * Describes some of the values in a certificate that are related to the
+   * subject and lifetime.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + * + * @return The subjectDescription. + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + getSubjectDescription(); + /** + * + * + *
+   * Describes some of the values in a certificate that are related to the
+   * subject and lifetime.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription subject_description = 1; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescriptionOrBuilder + getSubjectDescriptionOrBuilder(); + + /** + * + * + *
+   * Describes some of the technical fields in a certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + * + * @return Whether the configValues field is set. + */ + boolean hasConfigValues(); + /** + * + * + *
+   * Describes some of the technical fields in a certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + * + * @return The configValues. + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues getConfigValues(); + /** + * + * + *
+   * Describes some of the technical fields in a certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues config_values = 2; + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder + getConfigValuesOrBuilder(); + + /** + * + * + *
+   * The public key that corresponds to an issued certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + * + * @return Whether the publicKey field is set. + */ + boolean hasPublicKey(); + /** + * + * + *
+   * The public key that corresponds to an issued certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + * + * @return The publicKey. + */ + com.google.cloud.security.privateca.v1beta1.PublicKey getPublicKey(); + /** + * + * + *
+   * The public key that corresponds to an issued certificate.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.PublicKey public_key = 3; + */ + com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder getPublicKeyOrBuilder(); + + /** + * + * + *
+   * Provides a means of identifiying certificates that contain a particular
+   * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + * + * @return Whether the subjectKeyId field is set. + */ + boolean hasSubjectKeyId(); + /** + * + * + *
+   * Provides a means of identifiying certificates that contain a particular
+   * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + * + * @return The subjectKeyId. + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId getSubjectKeyId(); + /** + * + * + *
+   * Provides a means of identifiying certificates that contain a particular
+   * public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId subject_key_id = 4; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder + getSubjectKeyIdOrBuilder(); + + /** + * + * + *
+   * Identifies the subject_key_id of the parent certificate, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + * + * @return Whether the authorityKeyId field is set. + */ + boolean hasAuthorityKeyId(); + /** + * + * + *
+   * Identifies the subject_key_id of the parent certificate, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + * + * @return The authorityKeyId. + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId getAuthorityKeyId(); + /** + * + * + *
+   * Identifies the subject_key_id of the parent certificate, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.1
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId authority_key_id = 5; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyIdOrBuilder + getAuthorityKeyIdOrBuilder(); + + /** + * + * + *
+   * Describes a list of locations to obtain CRL information, i.e.
+   * the DistributionPoint.fullName described by
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+   * 
+ * + * repeated string crl_distribution_points = 6; + * + * @return A list containing the crlDistributionPoints. + */ + java.util.List getCrlDistributionPointsList(); + /** + * + * + *
+   * Describes a list of locations to obtain CRL information, i.e.
+   * the DistributionPoint.fullName described by
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+   * 
+ * + * repeated string crl_distribution_points = 6; + * + * @return The count of crlDistributionPoints. + */ + int getCrlDistributionPointsCount(); + /** + * + * + *
+   * Describes a list of locations to obtain CRL information, i.e.
+   * the DistributionPoint.fullName described by
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+   * 
+ * + * repeated string crl_distribution_points = 6; + * + * @param index The index of the element to return. + * @return The crlDistributionPoints at the given index. + */ + java.lang.String getCrlDistributionPoints(int index); + /** + * + * + *
+   * Describes a list of locations to obtain CRL information, i.e.
+   * the DistributionPoint.fullName described by
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.13
+   * 
+ * + * repeated string crl_distribution_points = 6; + * + * @param index The index of the value to return. + * @return The bytes of the crlDistributionPoints at the given index. + */ + com.google.protobuf.ByteString getCrlDistributionPointsBytes(int index); + + /** + * + * + *
+   * Describes lists of issuer CA certificate URLs that appear in the
+   * "Authority Information Access" extension in the certificate.
+   * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @return A list containing the aiaIssuingCertificateUrls. + */ + java.util.List getAiaIssuingCertificateUrlsList(); + /** + * + * + *
+   * Describes lists of issuer CA certificate URLs that appear in the
+   * "Authority Information Access" extension in the certificate.
+   * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @return The count of aiaIssuingCertificateUrls. + */ + int getAiaIssuingCertificateUrlsCount(); + /** + * + * + *
+   * Describes lists of issuer CA certificate URLs that appear in the
+   * "Authority Information Access" extension in the certificate.
+   * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @param index The index of the element to return. + * @return The aiaIssuingCertificateUrls at the given index. + */ + java.lang.String getAiaIssuingCertificateUrls(int index); + /** + * + * + *
+   * Describes lists of issuer CA certificate URLs that appear in the
+   * "Authority Information Access" extension in the certificate.
+   * 
+ * + * repeated string aia_issuing_certificate_urls = 7; + * + * @param index The index of the value to return. + * @return The bytes of the aiaIssuingCertificateUrls at the given index. + */ + com.google.protobuf.ByteString getAiaIssuingCertificateUrlsBytes(int index); + + /** + * + * + *
+   * The hash of the x.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + * + * @return Whether the certFingerprint field is set. + */ + boolean hasCertFingerprint(); + /** + * + * + *
+   * The hash of the x.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + * + * @return The certFingerprint. + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + getCertFingerprint(); + /** + * + * + *
+   * The hash of the x.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint cert_fingerprint = 8; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprintOrBuilder + getCertFingerprintOrBuilder(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateName.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateName.java new file mode 100644 index 00000000..fbdf82c9 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateName.java @@ -0,0 +1,251 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class CertificateName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificates/{certificate}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String certificateAuthority; + private final String certificate; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificateAuthority() { + return certificateAuthority; + } + + public String getCertificate() { + return certificate; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private CertificateName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + certificateAuthority = Preconditions.checkNotNull(builder.getCertificateAuthority()); + certificate = Preconditions.checkNotNull(builder.getCertificate()); + } + + public static CertificateName of( + String project, String location, String certificateAuthority, String certificate) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificateAuthority(certificateAuthority) + .setCertificate(certificate) + .build(); + } + + public static String format( + String project, String location, String certificateAuthority, String certificate) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificateAuthority(certificateAuthority) + .setCertificate(certificate) + .build() + .toString(); + } + + public static CertificateName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "CertificateName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("certificate_authority"), + matchMap.get("certificate")); + } + + 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 (CertificateName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("certificateAuthority", certificateAuthority); + fieldMapBuilder.put("certificate", certificate); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", + project, + "location", + location, + "certificate_authority", + certificateAuthority, + "certificate", + certificate); + } + + /** Builder for CertificateName. */ + public static class Builder { + + private String project; + private String location; + private String certificateAuthority; + private String certificate; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificateAuthority() { + return certificateAuthority; + } + + public String getCertificate() { + return certificate; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCertificateAuthority(String certificateAuthority) { + this.certificateAuthority = certificateAuthority; + return this; + } + + public Builder setCertificate(String certificate) { + this.certificate = certificate; + return this; + } + + private Builder() {} + + private Builder(CertificateName certificateName) { + project = certificateName.project; + location = certificateName.location; + certificateAuthority = certificateName.certificateAuthority; + certificate = certificateName.certificate; + } + + public CertificateName build() { + return new CertificateName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof CertificateName) { + CertificateName that = (CertificateName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.certificateAuthority.equals(that.certificateAuthority)) + && (this.certificate.equals(that.certificate)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= certificateAuthority.hashCode(); + h *= 1000003; + h ^= certificate.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateOrBuilder.java new file mode 100644 index 00000000..3cfceeb4 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateOrBuilder.java @@ -0,0 +1,469 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface CertificateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.Certificate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+   * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+   * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. A pem-encoded X.509 certificate signing request (CSR).
+   * 
+ * + * string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The pemCsr. + */ + java.lang.String getPemCsr(); + /** + * + * + *
+   * Immutable. A pem-encoded X.509 certificate signing request (CSR).
+   * 
+ * + * string pem_csr = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for pemCsr. + */ + com.google.protobuf.ByteString getPemCsrBytes(); + + /** + * + * + *
+   * Immutable. A description of the certificate and key that does not require X.509 or
+   * ASN.1.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * Immutable. A description of the certificate and key that does not require X.509 or
+   * ASN.1.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The config. + */ + com.google.cloud.security.privateca.v1beta1.CertificateConfig getConfig(); + /** + * + * + *
+   * Immutable. A description of the certificate and key that does not require X.509 or
+   * ASN.1.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateConfig config = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * Required. The desired lifetime of a certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate. Note that the lifetime may be truncated if it would extend
+   * past the life of any certificate authority in the issuing chain.
+   * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the lifetime field is set. + */ + boolean hasLifetime(); + /** + * + * + *
+   * Required. The desired lifetime of a certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate. Note that the lifetime may be truncated if it would extend
+   * past the life of any certificate authority in the issuing chain.
+   * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lifetime. + */ + com.google.protobuf.Duration getLifetime(); + /** + * + * + *
+   * Required. The desired lifetime of a certificate. Used to create the
+   * "not_before_time" and "not_after_time" fields inside an X.509
+   * certificate. Note that the lifetime may be truncated if it would extend
+   * past the life of any certificate authority in the issuing chain.
+   * 
+ * + * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.DurationOrBuilder getLifetimeOrBuilder(); + + /** + * + * + *
+   * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+   * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the revocationDetails field is set. + */ + boolean hasRevocationDetails(); + /** + * + * + *
+   * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+   * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The revocationDetails. + */ + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails getRevocationDetails(); + /** + * + * + *
+   * Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
+   * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails revocation_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetailsOrBuilder + getRevocationDetailsOrBuilder(); + + /** + * + * + *
+   * Output only. The pem-encoded, signed X.509 certificate.
+   * 
+ * + * string pem_certificate = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCertificate. + */ + java.lang.String getPemCertificate(); + /** + * + * + *
+   * Output only. The pem-encoded, signed X.509 certificate.
+   * 
+ * + * string pem_certificate = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + com.google.protobuf.ByteString getPemCertificateBytes(); + + /** + * + * + *
+   * Output only. A structured description of the issued X.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the certificateDescription field is set. + */ + boolean hasCertificateDescription(); + /** + * + * + *
+   * Output only. A structured description of the issued X.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The certificateDescription. + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescription getCertificateDescription(); + /** + * + * + *
+   * Output only. A structured description of the issued X.509 certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateDescription certificate_description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateDescriptionOrBuilder + getCertificateDescriptionOrBuilder(); + + /** + * + * + *
+   * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+   * in issuer-to-root order according to RFC 5246.
+   * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the pemCertificateChain. + */ + java.util.List getPemCertificateChainList(); + /** + * + * + *
+   * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+   * in issuer-to-root order according to RFC 5246.
+   * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of pemCertificateChain. + */ + int getPemCertificateChainCount(); + /** + * + * + *
+   * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+   * in issuer-to-root order according to RFC 5246.
+   * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The pemCertificateChain at the given index. + */ + java.lang.String getPemCertificateChain(int index); + /** + * + * + *
+   * Output only. The chain that may be used to verify the X.509 certificate. Expected to be
+   * in issuer-to-root order according to RFC 5246.
+   * 
+ * + * repeated string pem_certificate_chain = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pemCertificateChain at the given index. + */ + com.google.protobuf.ByteString getPemCertificateChainBytes(int index); + + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + public com.google.cloud.security.privateca.v1beta1.Certificate.CertificateConfigCase + getCertificateConfigCase(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateRevocationList.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateRevocationList.java new file mode 100644 index 00000000..cbb8d401 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateRevocationList.java @@ -0,0 +1,4095 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] corresponds to a signed X.509 certificate
+ * Revocation List (CRL). A CRL contains the serial numbers of certificates that
+ * should no longer be trusted.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateRevocationList} + */ +public final class CertificateRevocationList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateRevocationList) + CertificateRevocationListOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateRevocationList.newBuilder() to construct. + private CertificateRevocationList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateRevocationList() { + name_ = ""; + revokedCertificates_ = java.util.Collections.emptyList(); + pemCrl_ = ""; + accessUrl_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateRevocationList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CertificateRevocationList( + 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: + { + sequenceNumber_ = input.readInt64(); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + revokedCertificates_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate>(); + mutable_bitField0_ |= 0x00000001; + } + revokedCertificates_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate.parser(), + extensionRegistry)); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pemCrl_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + accessUrl_ = s; + break; + } + case 48: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + 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: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (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)) { + revokedCertificates_ = java.util.Collections.unmodifiableList(revokedCertificates_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.class, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder.class); + } + + /** + * + * + *
+   * The state of a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], indicating if it is current.
+   * 
+ * + * Protobuf enum {@code google.cloud.security.privateca.v1beta1.CertificateRevocationList.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] is up to date.
+     * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+     * The [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] is no longer current.
+     * 
+ * + * SUPERSEDED = 2; + */ + SUPERSEDED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] is up to date.
+     * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + * + * + *
+     * The [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] is no longer current.
+     * 
+ * + * SUPERSEDED = 2; + */ + public static final int SUPERSEDED_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 State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return SUPERSEDED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1beta1.CertificateRevocationList.State) + } + + public interface RevokedCertificateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+     * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * string certificate = 1; + * + * @return The certificate. + */ + java.lang.String getCertificate(); + /** + * + * + *
+     * The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+     * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * string certificate = 1; + * + * @return The bytes for certificate. + */ + com.google.protobuf.ByteString getCertificateBytes(); + + /** + * + * + *
+     * The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * string hex_serial_number = 2; + * + * @return The hexSerialNumber. + */ + java.lang.String getHexSerialNumber(); + /** + * + * + *
+     * The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * string hex_serial_number = 2; + * + * @return The bytes for hexSerialNumber. + */ + com.google.protobuf.ByteString getHexSerialNumberBytes(); + + /** + * + * + *
+     * The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_reason = 3; + * + * @return The enum numeric value on the wire for revocationReason. + */ + int getRevocationReasonValue(); + /** + * + * + *
+     * The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_reason = 3; + * + * @return The revocationReason. + */ + com.google.cloud.security.privateca.v1beta1.RevocationReason getRevocationReason(); + } + /** + * + * + *
+   * Describes a revoked [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate} + */ + public static final class RevokedCertificate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate) + RevokedCertificateOrBuilder { + private static final long serialVersionUID = 0L; + // Use RevokedCertificate.newBuilder() to construct. + private RevokedCertificate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RevokedCertificate() { + certificate_ = ""; + hexSerialNumber_ = ""; + revocationReason_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RevokedCertificate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RevokedCertificate( + 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(); + + certificate_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + hexSerialNumber_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + revocationReason_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_RevokedCertificate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_RevokedCertificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate.class, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate.Builder.class); + } + + public static final int CERTIFICATE_FIELD_NUMBER = 1; + private volatile java.lang.Object certificate_; + /** + * + * + *
+     * The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+     * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * string certificate = 1; + * + * @return The certificate. + */ + @java.lang.Override + public java.lang.String getCertificate() { + java.lang.Object ref = certificate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificate_ = s; + return s; + } + } + /** + * + * + *
+     * The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+     * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * string certificate = 1; + * + * @return The bytes for certificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCertificateBytes() { + java.lang.Object ref = certificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEX_SERIAL_NUMBER_FIELD_NUMBER = 2; + private volatile java.lang.Object hexSerialNumber_; + /** + * + * + *
+     * The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * string hex_serial_number = 2; + * + * @return The hexSerialNumber. + */ + @java.lang.Override + public java.lang.String getHexSerialNumber() { + java.lang.Object ref = hexSerialNumber_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hexSerialNumber_ = s; + return s; + } + } + /** + * + * + *
+     * The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * string hex_serial_number = 2; + * + * @return The bytes for hexSerialNumber. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHexSerialNumberBytes() { + java.lang.Object ref = hexSerialNumber_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hexSerialNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVOCATION_REASON_FIELD_NUMBER = 3; + private int revocationReason_; + /** + * + * + *
+     * The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_reason = 3; + * + * @return The enum numeric value on the wire for revocationReason. + */ + @java.lang.Override + public int getRevocationReasonValue() { + return revocationReason_; + } + /** + * + * + *
+     * The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_reason = 3; + * + * @return The revocationReason. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RevocationReason getRevocationReason() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.RevocationReason result = + com.google.cloud.security.privateca.v1beta1.RevocationReason.valueOf(revocationReason_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.RevocationReason.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 (!getCertificateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, certificate_); + } + if (!getHexSerialNumberBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hexSerialNumber_); + } + if (revocationReason_ + != com.google.cloud.security.privateca.v1beta1.RevocationReason + .REVOCATION_REASON_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, revocationReason_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCertificateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, certificate_); + } + if (!getHexSerialNumberBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, hexSerialNumber_); + } + if (revocationReason_ + != com.google.cloud.security.privateca.v1beta1.RevocationReason + .REVOCATION_REASON_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, revocationReason_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + other = + (com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate) + obj; + + if (!getCertificate().equals(other.getCertificate())) return false; + if (!getHexSerialNumber().equals(other.getHexSerialNumber())) return false; + if (revocationReason_ != other.revocationReason_) return false; + if (!unknownFields.equals(other.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) + CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getCertificate().hashCode(); + hash = (37 * hash) + HEX_SERIAL_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getHexSerialNumber().hashCode(); + hash = (37 * hash) + REVOCATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + revocationReason_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Describes a revoked [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate) + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_RevokedCertificate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_RevokedCertificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate.class, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + certificate_ = ""; + + hexSerialNumber_ = ""; + + revocationReason_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_RevokedCertificate_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + build() { + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + result = + new com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate(this); + result.certificate_ = certificate_; + result.hexSerialNumber_ = hexSerialNumber_; + result.revocationReason_ = revocationReason_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate.getDefaultInstance()) return this; + if (!other.getCertificate().isEmpty()) { + certificate_ = other.certificate_; + onChanged(); + } + if (!other.getHexSerialNumber().isEmpty()) { + hexSerialNumber_ = other.hexSerialNumber_; + onChanged(); + } + if (other.revocationReason_ != 0) { + setRevocationReasonValue(other.getRevocationReasonValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object certificate_ = ""; + /** + * + * + *
+       * The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+       * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+       * 
+ * + * string certificate = 1; + * + * @return The certificate. + */ + public java.lang.String getCertificate() { + java.lang.Object ref = certificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+       * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+       * 
+ * + * string certificate = 1; + * + * @return The bytes for certificate. + */ + public com.google.protobuf.ByteString getCertificateBytes() { + java.lang.Object ref = certificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+       * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+       * 
+ * + * string certificate = 1; + * + * @param value The certificate to set. + * @return This builder for chaining. + */ + public Builder setCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + certificate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+       * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+       * 
+ * + * string certificate = 1; + * + * @return This builder for chaining. + */ + public Builder clearCertificate() { + + certificate_ = getDefaultInstance().getCertificate(); + onChanged(); + return this; + } + /** + * + * + *
+       * The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
+       * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+       * 
+ * + * string certificate = 1; + * + * @param value The bytes for certificate to set. + * @return This builder for chaining. + */ + public Builder setCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + certificate_ = value; + onChanged(); + return this; + } + + private java.lang.Object hexSerialNumber_ = ""; + /** + * + * + *
+       * The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * string hex_serial_number = 2; + * + * @return The hexSerialNumber. + */ + public java.lang.String getHexSerialNumber() { + java.lang.Object ref = hexSerialNumber_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hexSerialNumber_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * string hex_serial_number = 2; + * + * @return The bytes for hexSerialNumber. + */ + public com.google.protobuf.ByteString getHexSerialNumberBytes() { + java.lang.Object ref = hexSerialNumber_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hexSerialNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * string hex_serial_number = 2; + * + * @param value The hexSerialNumber to set. + * @return This builder for chaining. + */ + public Builder setHexSerialNumber(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hexSerialNumber_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * string hex_serial_number = 2; + * + * @return This builder for chaining. + */ + public Builder clearHexSerialNumber() { + + hexSerialNumber_ = getDefaultInstance().getHexSerialNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
+       * 
+ * + * string hex_serial_number = 2; + * + * @param value The bytes for hexSerialNumber to set. + * @return This builder for chaining. + */ + public Builder setHexSerialNumberBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hexSerialNumber_ = value; + onChanged(); + return this; + } + + private int revocationReason_ = 0; + /** + * + * + *
+       * The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_reason = 3; + * + * + * @return The enum numeric value on the wire for revocationReason. + */ + @java.lang.Override + public int getRevocationReasonValue() { + return revocationReason_; + } + /** + * + * + *
+       * The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_reason = 3; + * + * + * @param value The enum numeric value on the wire for revocationReason to set. + * @return This builder for chaining. + */ + public Builder setRevocationReasonValue(int value) { + + revocationReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_reason = 3; + * + * + * @return The revocationReason. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RevocationReason getRevocationReason() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.RevocationReason result = + com.google.cloud.security.privateca.v1beta1.RevocationReason.valueOf(revocationReason_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.RevocationReason.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_reason = 3; + * + * + * @param value The revocationReason to set. + * @return This builder for chaining. + */ + public Builder setRevocationReason( + com.google.cloud.security.privateca.v1beta1.RevocationReason value) { + if (value == null) { + throw new NullPointerException(); + } + + revocationReason_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
+       * 
+ * + * .google.cloud.security.privateca.v1beta1.RevocationReason revocation_reason = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearRevocationReason() { + + revocationReason_ = 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.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate) + private static final com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RevokedCertificate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RevokedCertificate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in
+   * the format
+   * `projects/*/locations/*/certificateAuthorities/*/
+   *    certificateRevocationLists/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in
+   * the format
+   * `projects/*/locations/*/certificateAuthorities/*/
+   *    certificateRevocationLists/*`.
+   * 
+ * + * 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 SEQUENCE_NUMBER_FIELD_NUMBER = 2; + private long sequenceNumber_; + /** + * + * + *
+   * Output only. The CRL sequence number that appears in pem_crl.
+   * 
+ * + * int64 sequence_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sequenceNumber. + */ + @java.lang.Override + public long getSequenceNumber() { + return sequenceNumber_; + } + + public static final int REVOKED_CERTIFICATES_FIELD_NUMBER = 3; + private java.util.List< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate> + revokedCertificates_; + /** + * + * + *
+   * Output only. The revoked serial numbers that appear in pem_crl.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate> + getRevokedCertificatesList() { + return revokedCertificates_; + } + /** + * + * + *
+   * Output only. The revoked serial numbers that appear in pem_crl.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificateOrBuilder> + getRevokedCertificatesOrBuilderList() { + return revokedCertificates_; + } + /** + * + * + *
+   * Output only. The revoked serial numbers that appear in pem_crl.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getRevokedCertificatesCount() { + return revokedCertificates_.size(); + } + /** + * + * + *
+   * Output only. The revoked serial numbers that appear in pem_crl.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + getRevokedCertificates(int index) { + return revokedCertificates_.get(index); + } + /** + * + * + *
+   * Output only. The revoked serial numbers that appear in pem_crl.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificateOrBuilder + getRevokedCertificatesOrBuilder(int index) { + return revokedCertificates_.get(index); + } + + public static final int PEM_CRL_FIELD_NUMBER = 4; + private volatile java.lang.Object pemCrl_; + /** + * + * + *
+   * Output only. The PEM-encoded X.509 CRL.
+   * 
+ * + * string pem_crl = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCrl. + */ + @java.lang.Override + public java.lang.String getPemCrl() { + java.lang.Object ref = pemCrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCrl_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The PEM-encoded X.509 CRL.
+   * 
+ * + * string pem_crl = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPemCrlBytes() { + java.lang.Object ref = pemCrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCESS_URL_FIELD_NUMBER = 5; + private volatile java.lang.Object accessUrl_; + /** + * + * + *
+   * Output only. The location where 'pem_crl' can be accessed.
+   * 
+ * + * string access_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The accessUrl. + */ + @java.lang.Override + public java.lang.String getAccessUrl() { + java.lang.Object ref = accessUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessUrl_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The location where 'pem_crl' can be accessed.
+   * 
+ * + * string access_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for accessUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccessUrlBytes() { + java.lang.Object ref = accessUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_; + /** + * + * + *
+   * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State result = + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State.valueOf(state_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 LABELS_FIELD_NUMBER = 9; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (sequenceNumber_ != 0L) { + output.writeInt64(2, sequenceNumber_); + } + for (int i = 0; i < revokedCertificates_.size(); i++) { + output.writeMessage(3, revokedCertificates_.get(i)); + } + if (!getPemCrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pemCrl_); + } + if (!getAccessUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, accessUrl_); + } + if (state_ + != com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, state_); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(8, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); + 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 (sequenceNumber_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, sequenceNumber_); + } + for (int i = 0; i < revokedCertificates_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, revokedCertificates_.get(i)); + } + if (!getPemCrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pemCrl_); + } + if (!getAccessUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, accessUrl_); + } + if (state_ + != com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, labels__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.CertificateRevocationList)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList other = + (com.google.cloud.security.privateca.v1beta1.CertificateRevocationList) obj; + + if (!getName().equals(other.getName())) return false; + if (getSequenceNumber() != other.getSequenceNumber()) return false; + if (!getRevokedCertificatesList().equals(other.getRevokedCertificatesList())) return false; + if (!getPemCrl().equals(other.getPemCrl())) return false; + if (!getAccessUrl().equals(other.getAccessUrl())) return false; + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SEQUENCE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSequenceNumber()); + if (getRevokedCertificatesCount() > 0) { + hash = (37 * hash) + REVOKED_CERTIFICATES_FIELD_NUMBER; + hash = (53 * hash) + getRevokedCertificatesList().hashCode(); + } + hash = (37 * hash) + PEM_CRL_FIELD_NUMBER; + hash = (53 * hash) + getPemCrl().hashCode(); + hash = (37 * hash) + ACCESS_URL_FIELD_NUMBER; + hash = (53 * hash) + getAccessUrl().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] corresponds to a signed X.509 certificate
+   * Revocation List (CRL). A CRL contains the serial numbers of certificates that
+   * should no longer be trusted.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CertificateRevocationList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CertificateRevocationList) + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 9: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.class, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRevokedCertificatesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + sequenceNumber_ = 0L; + + if (revokedCertificatesBuilder_ == null) { + revokedCertificates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + revokedCertificatesBuilder_.clear(); + } + pemCrl_ = ""; + + accessUrl_ = ""; + + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList build() { + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList buildPartial() { + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList result = + new com.google.cloud.security.privateca.v1beta1.CertificateRevocationList(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.sequenceNumber_ = sequenceNumber_; + if (revokedCertificatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + revokedCertificates_ = java.util.Collections.unmodifiableList(revokedCertificates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.revokedCertificates_ = revokedCertificates_; + } else { + result.revokedCertificates_ = revokedCertificatesBuilder_.build(); + } + result.pemCrl_ = pemCrl_; + result.accessUrl_ = accessUrl_; + result.state_ = state_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.CertificateRevocationList) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CertificateRevocationList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getSequenceNumber() != 0L) { + setSequenceNumber(other.getSequenceNumber()); + } + if (revokedCertificatesBuilder_ == null) { + if (!other.revokedCertificates_.isEmpty()) { + if (revokedCertificates_.isEmpty()) { + revokedCertificates_ = other.revokedCertificates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRevokedCertificatesIsMutable(); + revokedCertificates_.addAll(other.revokedCertificates_); + } + onChanged(); + } + } else { + if (!other.revokedCertificates_.isEmpty()) { + if (revokedCertificatesBuilder_.isEmpty()) { + revokedCertificatesBuilder_.dispose(); + revokedCertificatesBuilder_ = null; + revokedCertificates_ = other.revokedCertificates_; + bitField0_ = (bitField0_ & ~0x00000001); + revokedCertificatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRevokedCertificatesFieldBuilder() + : null; + } else { + revokedCertificatesBuilder_.addAllMessages(other.revokedCertificates_); + } + } + } + if (!other.getPemCrl().isEmpty()) { + pemCrl_ = other.pemCrl_; + onChanged(); + } + if (!other.getAccessUrl().isEmpty()) { + accessUrl_ = other.accessUrl_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CertificateRevocationList) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in
+     * the format
+     * `projects/*/locations/*/certificateAuthorities/*/
+     *    certificateRevocationLists/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in
+     * the format
+     * `projects/*/locations/*/certificateAuthorities/*/
+     *    certificateRevocationLists/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in
+     * the format
+     * `projects/*/locations/*/certificateAuthorities/*/
+     *    certificateRevocationLists/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in
+     * the format
+     * `projects/*/locations/*/certificateAuthorities/*/
+     *    certificateRevocationLists/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in
+     * the format
+     * `projects/*/locations/*/certificateAuthorities/*/
+     *    certificateRevocationLists/*`.
+     * 
+ * + * 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 long sequenceNumber_; + /** + * + * + *
+     * Output only. The CRL sequence number that appears in pem_crl.
+     * 
+ * + * int64 sequence_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sequenceNumber. + */ + @java.lang.Override + public long getSequenceNumber() { + return sequenceNumber_; + } + /** + * + * + *
+     * Output only. The CRL sequence number that appears in pem_crl.
+     * 
+ * + * int64 sequence_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sequenceNumber to set. + * @return This builder for chaining. + */ + public Builder setSequenceNumber(long value) { + + sequenceNumber_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The CRL sequence number that appears in pem_crl.
+     * 
+ * + * int64 sequence_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSequenceNumber() { + + sequenceNumber_ = 0L; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate> + revokedCertificates_ = java.util.Collections.emptyList(); + + private void ensureRevokedCertificatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + revokedCertificates_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate>(revokedCertificates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + .Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificateOrBuilder> + revokedCertificatesBuilder_; + + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate> + getRevokedCertificatesList() { + if (revokedCertificatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(revokedCertificates_); + } else { + return revokedCertificatesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getRevokedCertificatesCount() { + if (revokedCertificatesBuilder_ == null) { + return revokedCertificates_.size(); + } else { + return revokedCertificatesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + getRevokedCertificates(int index) { + if (revokedCertificatesBuilder_ == null) { + return revokedCertificates_.get(index); + } else { + return revokedCertificatesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRevokedCertificates( + int index, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + value) { + if (revokedCertificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRevokedCertificatesIsMutable(); + revokedCertificates_.set(index, value); + onChanged(); + } else { + revokedCertificatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRevokedCertificates( + int index, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + .Builder + builderForValue) { + if (revokedCertificatesBuilder_ == null) { + ensureRevokedCertificatesIsMutable(); + revokedCertificates_.set(index, builderForValue.build()); + onChanged(); + } else { + revokedCertificatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRevokedCertificates( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + value) { + if (revokedCertificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRevokedCertificatesIsMutable(); + revokedCertificates_.add(value); + onChanged(); + } else { + revokedCertificatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRevokedCertificates( + int index, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + value) { + if (revokedCertificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRevokedCertificatesIsMutable(); + revokedCertificates_.add(index, value); + onChanged(); + } else { + revokedCertificatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRevokedCertificates( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + .Builder + builderForValue) { + if (revokedCertificatesBuilder_ == null) { + ensureRevokedCertificatesIsMutable(); + revokedCertificates_.add(builderForValue.build()); + onChanged(); + } else { + revokedCertificatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRevokedCertificates( + int index, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + .Builder + builderForValue) { + if (revokedCertificatesBuilder_ == null) { + ensureRevokedCertificatesIsMutable(); + revokedCertificates_.add(index, builderForValue.build()); + onChanged(); + } else { + revokedCertificatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllRevokedCertificates( + java.lang.Iterable< + ? extends + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate> + values) { + if (revokedCertificatesBuilder_ == null) { + ensureRevokedCertificatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, revokedCertificates_); + onChanged(); + } else { + revokedCertificatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRevokedCertificates() { + if (revokedCertificatesBuilder_ == null) { + revokedCertificates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + revokedCertificatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeRevokedCertificates(int index) { + if (revokedCertificatesBuilder_ == null) { + ensureRevokedCertificatesIsMutable(); + revokedCertificates_.remove(index); + onChanged(); + } else { + revokedCertificatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + .Builder + getRevokedCertificatesBuilder(int index) { + return getRevokedCertificatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificateOrBuilder + getRevokedCertificatesOrBuilder(int index) { + if (revokedCertificatesBuilder_ == null) { + return revokedCertificates_.get(index); + } else { + return revokedCertificatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificateOrBuilder> + getRevokedCertificatesOrBuilderList() { + if (revokedCertificatesBuilder_ != null) { + return revokedCertificatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(revokedCertificates_); + } + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + .Builder + addRevokedCertificatesBuilder() { + return getRevokedCertificatesFieldBuilder() + .addBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + .Builder + addRevokedCertificatesBuilder(int index) { + return getRevokedCertificatesFieldBuilder() + .addBuilder( + index, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The revoked serial numbers that appear in pem_crl.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + .Builder> + getRevokedCertificatesBuilderList() { + return getRevokedCertificatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + .Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificateOrBuilder> + getRevokedCertificatesFieldBuilder() { + if (revokedCertificatesBuilder_ == null) { + revokedCertificatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificate.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificateOrBuilder>( + revokedCertificates_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + revokedCertificates_ = null; + } + return revokedCertificatesBuilder_; + } + + private java.lang.Object pemCrl_ = ""; + /** + * + * + *
+     * Output only. The PEM-encoded X.509 CRL.
+     * 
+ * + * string pem_crl = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCrl. + */ + public java.lang.String getPemCrl() { + java.lang.Object ref = pemCrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The PEM-encoded X.509 CRL.
+     * 
+ * + * string pem_crl = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCrl. + */ + public com.google.protobuf.ByteString getPemCrlBytes() { + java.lang.Object ref = pemCrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The PEM-encoded X.509 CRL.
+     * 
+ * + * string pem_crl = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pemCrl to set. + * @return This builder for chaining. + */ + public Builder setPemCrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pemCrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PEM-encoded X.509 CRL.
+     * 
+ * + * string pem_crl = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPemCrl() { + + pemCrl_ = getDefaultInstance().getPemCrl(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PEM-encoded X.509 CRL.
+     * 
+ * + * string pem_crl = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pemCrl to set. + * @return This builder for chaining. + */ + public Builder setPemCrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pemCrl_ = value; + onChanged(); + return this; + } + + private java.lang.Object accessUrl_ = ""; + /** + * + * + *
+     * Output only. The location where 'pem_crl' can be accessed.
+     * 
+ * + * string access_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The accessUrl. + */ + public java.lang.String getAccessUrl() { + java.lang.Object ref = accessUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The location where 'pem_crl' can be accessed.
+     * 
+ * + * string access_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for accessUrl. + */ + public com.google.protobuf.ByteString getAccessUrlBytes() { + java.lang.Object ref = accessUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The location where 'pem_crl' can be accessed.
+     * 
+ * + * string access_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The accessUrl to set. + * @return This builder for chaining. + */ + public Builder setAccessUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + accessUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The location where 'pem_crl' can be accessed.
+     * 
+ * + * string access_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAccessUrl() { + + accessUrl_ = getDefaultInstance().getAccessUrl(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The location where 'pem_crl' can be accessed.
+     * 
+ * + * string access_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for accessUrl to set. + * @return This builder for chaining. + */ + public Builder setAccessUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + accessUrl_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State result = + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State.valueOf( + state_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CertificateRevocationList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CertificateRevocationList) + private static final com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.CertificateRevocationList(); + } + + public static com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateRevocationList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CertificateRevocationList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateRevocationListName.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateRevocationListName.java new file mode 100644 index 00000000..28c09a5d --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateRevocationListName.java @@ -0,0 +1,258 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class CertificateRevocationListName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String certificateAuthority; + private final String certificateRevocationList; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificateAuthority() { + return certificateAuthority; + } + + public String getCertificateRevocationList() { + return certificateRevocationList; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private CertificateRevocationListName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + certificateAuthority = Preconditions.checkNotNull(builder.getCertificateAuthority()); + certificateRevocationList = Preconditions.checkNotNull(builder.getCertificateRevocationList()); + } + + public static CertificateRevocationListName of( + String project, + String location, + String certificateAuthority, + String certificateRevocationList) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificateAuthority(certificateAuthority) + .setCertificateRevocationList(certificateRevocationList) + .build(); + } + + public static String format( + String project, + String location, + String certificateAuthority, + String certificateRevocationList) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificateAuthority(certificateAuthority) + .setCertificateRevocationList(certificateRevocationList) + .build() + .toString(); + } + + public static CertificateRevocationListName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, + "CertificateRevocationListName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("certificate_authority"), + matchMap.get("certificate_revocation_list")); + } + + 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 (CertificateRevocationListName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("certificateAuthority", certificateAuthority); + fieldMapBuilder.put("certificateRevocationList", certificateRevocationList); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", + project, + "location", + location, + "certificate_authority", + certificateAuthority, + "certificate_revocation_list", + certificateRevocationList); + } + + /** Builder for CertificateRevocationListName. */ + public static class Builder { + + private String project; + private String location; + private String certificateAuthority; + private String certificateRevocationList; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificateAuthority() { + return certificateAuthority; + } + + public String getCertificateRevocationList() { + return certificateRevocationList; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCertificateAuthority(String certificateAuthority) { + this.certificateAuthority = certificateAuthority; + return this; + } + + public Builder setCertificateRevocationList(String certificateRevocationList) { + this.certificateRevocationList = certificateRevocationList; + return this; + } + + private Builder() {} + + private Builder(CertificateRevocationListName certificateRevocationListName) { + project = certificateRevocationListName.project; + location = certificateRevocationListName.location; + certificateAuthority = certificateRevocationListName.certificateAuthority; + certificateRevocationList = certificateRevocationListName.certificateRevocationList; + } + + public CertificateRevocationListName build() { + return new CertificateRevocationListName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof CertificateRevocationListName) { + CertificateRevocationListName that = (CertificateRevocationListName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.certificateAuthority.equals(that.certificateAuthority)) + && (this.certificateRevocationList.equals(that.certificateRevocationList)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= certificateAuthority.hashCode(); + h *= 1000003; + h ^= certificateRevocationList.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateRevocationListOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateRevocationListOrBuilder.java new file mode 100644 index 00000000..c2fd3291 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateRevocationListOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface CertificateRevocationListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CertificateRevocationList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in
+   * the format
+   * `projects/*/locations/*/certificateAuthorities/*/
+   *    certificateRevocationLists/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in
+   * the format
+   * `projects/*/locations/*/certificateAuthorities/*/
+   *    certificateRevocationLists/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The CRL sequence number that appears in pem_crl.
+   * 
+ * + * int64 sequence_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sequenceNumber. + */ + long getSequenceNumber(); + + /** + * + * + *
+   * Output only. The revoked serial numbers that appear in pem_crl.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate> + getRevokedCertificatesList(); + /** + * + * + *
+   * Output only. The revoked serial numbers that appear in pem_crl.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + getRevokedCertificates(int index); + /** + * + * + *
+   * Output only. The revoked serial numbers that appear in pem_crl.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getRevokedCertificatesCount(); + /** + * + * + *
+   * Output only. The revoked serial numbers that appear in pem_crl.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .RevokedCertificateOrBuilder> + getRevokedCertificatesOrBuilderList(); + /** + * + * + *
+   * Output only. The revoked serial numbers that appear in pem_crl.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate revoked_certificates = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificateOrBuilder + getRevokedCertificatesOrBuilder(int index); + + /** + * + * + *
+   * Output only. The PEM-encoded X.509 CRL.
+   * 
+ * + * string pem_crl = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCrl. + */ + java.lang.String getPemCrl(); + /** + * + * + *
+   * Output only. The PEM-encoded X.509 CRL.
+   * 
+ * + * string pem_crl = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCrl. + */ + com.google.protobuf.ByteString getPemCrlBytes(); + + /** + * + * + *
+   * Output only. The location where 'pem_crl' can be accessed.
+   * 
+ * + * string access_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The accessUrl. + */ + java.lang.String getAccessUrl(); + /** + * + * + *
+   * Output only. The location where 'pem_crl' can be accessed.
+   * 
+ * + * string access_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for accessUrl. + */ + com.google.protobuf.ByteString getAccessUrlBytes(); + + /** + * + * + *
+   * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State getState(); + + /** + * + * + *
+   * Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was 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 this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateAuthorityRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateAuthorityRequest.java new file mode 100644 index 00000000..122ecf61 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateAuthorityRequest.java @@ -0,0 +1,1441 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.CreateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest} + */ +public final class CreateCertificateAuthorityRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest) + CreateCertificateAuthorityRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCertificateAuthorityRequest.newBuilder() to construct. + private CreateCertificateAuthorityRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCertificateAuthorityRequest() { + parent_ = ""; + certificateAuthorityId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCertificateAuthorityRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateCertificateAuthorityRequest( + 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(); + + certificateAuthorityId_ = s; + break; + } + case 26: + { + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder subBuilder = + null; + if (certificateAuthority_ != null) { + subBuilder = certificateAuthority_.toBuilder(); + } + certificateAuthority_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificateAuthority_); + certificateAuthority_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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 CERTIFICATE_AUTHORITY_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object certificateAuthorityId_; + /** + * + * + *
+   * Required. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string certificate_authority_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateAuthorityId. + */ + @java.lang.Override + public java.lang.String getCertificateAuthorityId() { + java.lang.Object ref = certificateAuthorityId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateAuthorityId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string certificate_authority_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateAuthorityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCertificateAuthorityIdBytes() { + java.lang.Object ref = certificateAuthorityId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateAuthorityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERTIFICATE_AUTHORITY_FIELD_NUMBER = 3; + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority certificateAuthority_; + /** + * + * + *
+   * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateAuthority field is set. + */ + @java.lang.Override + public boolean hasCertificateAuthority() { + return certificateAuthority_ != null; + } + /** + * + * + *
+   * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateAuthority. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + getCertificateAuthority() { + return certificateAuthority_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.getDefaultInstance() + : certificateAuthority_; + } + /** + * + * + *
+   * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder + getCertificateAuthorityOrBuilder() { + return getCertificateAuthority(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (!getCertificateAuthorityIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, certificateAuthorityId_); + } + if (certificateAuthority_ != null) { + output.writeMessage(3, getCertificateAuthority()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getCertificateAuthorityIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, certificateAuthorityId_); + } + if (certificateAuthority_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCertificateAuthority()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest other = + (com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getCertificateAuthorityId().equals(other.getCertificateAuthorityId())) return false; + if (hasCertificateAuthority() != other.hasCertificateAuthority()) return false; + if (hasCertificateAuthority()) { + if (!getCertificateAuthority().equals(other.getCertificateAuthority())) 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(); + hash = (37 * hash) + CERTIFICATE_AUTHORITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getCertificateAuthorityId().hashCode(); + if (hasCertificateAuthority()) { + hash = (37 * hash) + CERTIFICATE_AUTHORITY_FIELD_NUMBER; + hash = (53 * hash) + getCertificateAuthority().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.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.CreateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest) + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + certificateAuthorityId_ = ""; + + if (certificateAuthorityBuilder_ == null) { + certificateAuthority_ = null; + } else { + certificateAuthority_ = null; + certificateAuthorityBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest build() { + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest result = + new com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest(this); + result.parent_ = parent_; + result.certificateAuthorityId_ = certificateAuthorityId_; + if (certificateAuthorityBuilder_ == null) { + result.certificateAuthority_ = certificateAuthority_; + } else { + result.certificateAuthority_ = certificateAuthorityBuilder_.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.security.privateca.v1beta1.CreateCertificateAuthorityRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getCertificateAuthorityId().isEmpty()) { + certificateAuthorityId_ = other.certificateAuthorityId_; + onChanged(); + } + if (other.hasCertificateAuthority()) { + mergeCertificateAuthority(other.getCertificateAuthority()); + } + 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.security.privateca.v1beta1.CreateCertificateAuthorityRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the location associated with the
+     * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 certificateAuthorityId_ = ""; + /** + * + * + *
+     * Required. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string certificate_authority_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateAuthorityId. + */ + public java.lang.String getCertificateAuthorityId() { + java.lang.Object ref = certificateAuthorityId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateAuthorityId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string certificate_authority_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateAuthorityId. + */ + public com.google.protobuf.ByteString getCertificateAuthorityIdBytes() { + java.lang.Object ref = certificateAuthorityId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateAuthorityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string certificate_authority_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The certificateAuthorityId to set. + * @return This builder for chaining. + */ + public Builder setCertificateAuthorityId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + certificateAuthorityId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string certificate_authority_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCertificateAuthorityId() { + + certificateAuthorityId_ = getDefaultInstance().getCertificateAuthorityId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string certificate_authority_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for certificateAuthorityId to set. + * @return This builder for chaining. + */ + public Builder setCertificateAuthorityIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + certificateAuthorityId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority certificateAuthority_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder> + certificateAuthorityBuilder_; + /** + * + * + *
+     * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateAuthority field is set. + */ + public boolean hasCertificateAuthority() { + return certificateAuthorityBuilder_ != null || certificateAuthority_ != null; + } + /** + * + * + *
+     * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateAuthority. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + getCertificateAuthority() { + if (certificateAuthorityBuilder_ == null) { + return certificateAuthority_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.getDefaultInstance() + : certificateAuthority_; + } else { + return certificateAuthorityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority value) { + if (certificateAuthorityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateAuthority_ = value; + onChanged(); + } else { + certificateAuthorityBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder builderForValue) { + if (certificateAuthorityBuilder_ == null) { + certificateAuthority_ = builderForValue.build(); + onChanged(); + } else { + certificateAuthorityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority value) { + if (certificateAuthorityBuilder_ == null) { + if (certificateAuthority_ != null) { + certificateAuthority_ = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.newBuilder( + certificateAuthority_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateAuthority_ = value; + } + onChanged(); + } else { + certificateAuthorityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificateAuthority() { + if (certificateAuthorityBuilder_ == null) { + certificateAuthority_ = null; + onChanged(); + } else { + certificateAuthority_ = null; + certificateAuthorityBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder + getCertificateAuthorityBuilder() { + + onChanged(); + return getCertificateAuthorityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder + getCertificateAuthorityOrBuilder() { + if (certificateAuthorityBuilder_ != null) { + return certificateAuthorityBuilder_.getMessageOrBuilder(); + } else { + return certificateAuthority_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.getDefaultInstance() + : certificateAuthority_; + } + } + /** + * + * + *
+     * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder> + getCertificateAuthorityFieldBuilder() { + if (certificateAuthorityBuilder_ == null) { + certificateAuthorityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder>( + getCertificateAuthority(), getParentForChildren(), isClean()); + certificateAuthority_ = null; + } + return certificateAuthorityBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest) + private static final com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCertificateAuthorityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateCertificateAuthorityRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateAuthorityRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateAuthorityRequestOrBuilder.java new file mode 100644 index 00000000..47c7c7f4 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateAuthorityRequestOrBuilder.java @@ -0,0 +1,172 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface CreateCertificateAuthorityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string certificate_authority_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateAuthorityId. + */ + java.lang.String getCertificateAuthorityId(); + /** + * + * + *
+   * Required. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string certificate_authority_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateAuthorityId. + */ + com.google.protobuf.ByteString getCertificateAuthorityIdBytes(); + + /** + * + * + *
+   * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateAuthority field is set. + */ + boolean hasCertificateAuthority(); + /** + * + * + *
+   * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateAuthority. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority getCertificateAuthority(); + /** + * + * + *
+   * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder + getCertificateAuthorityOrBuilder(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRequest.java new file mode 100644 index 00000000..8ae5e95a --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRequest.java @@ -0,0 +1,1430 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for [CertificateAuthorityService.CreateCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CreateCertificateRequest} + */ +public final class CreateCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CreateCertificateRequest) + CreateCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCertificateRequest.newBuilder() to construct. + private CreateCertificateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCertificateRequest() { + parent_ = ""; + certificateId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateCertificateRequest( + 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(); + + certificateId_ = s; + break; + } + case 26: + { + com.google.cloud.security.privateca.v1beta1.Certificate.Builder subBuilder = null; + if (certificate_ != null) { + subBuilder = certificate_.toBuilder(); + } + certificate_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.Certificate.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificate_); + certificate_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest.class, + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+   * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format
+   * `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+   * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format
+   * `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 CERTIFICATE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object certificateId_; + /** + * + * + *
+   * Optional. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
+   * but is optional and its value is ignored otherwise.
+   * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The certificateId. + */ + @java.lang.Override + public java.lang.String getCertificateId() { + java.lang.Object ref = certificateId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
+   * but is optional and its value is ignored otherwise.
+   * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for certificateId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCertificateIdBytes() { + java.lang.Object ref = certificateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERTIFICATE_FIELD_NUMBER = 3; + private com.google.cloud.security.privateca.v1beta1.Certificate certificate_; + /** + * + * + *
+   * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + @java.lang.Override + public boolean hasCertificate() { + return certificate_ != null; + } + /** + * + * + *
+   * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate getCertificate() { + return certificate_ == null + ? com.google.cloud.security.privateca.v1beta1.Certificate.getDefaultInstance() + : certificate_; + } + /** + * + * + *
+   * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder + getCertificateOrBuilder() { + return getCertificate(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (!getCertificateIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, certificateId_); + } + if (certificate_ != null) { + output.writeMessage(3, getCertificate()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getCertificateIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, certificateId_); + } + if (certificate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCertificate()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest other = + (com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getCertificateId().equals(other.getCertificateId())) return false; + if (hasCertificate() != other.hasCertificate()) return false; + if (hasCertificate()) { + if (!getCertificate().equals(other.getCertificate())) 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(); + hash = (37 * hash) + CERTIFICATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getCertificateId().hashCode(); + if (hasCertificate()) { + hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getCertificate().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.security.privateca.v1beta1.CreateCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CertificateAuthorityService.CreateCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CreateCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CreateCertificateRequest) + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest.class, + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + certificateId_ = ""; + + if (certificateBuilder_ == null) { + certificate_ = null; + } else { + certificate_ = null; + certificateBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest build() { + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest buildPartial() { + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest result = + new com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest(this); + result.parent_ = parent_; + result.certificateId_ = certificateId_; + if (certificateBuilder_ == null) { + result.certificate_ = certificate_; + } else { + result.certificate_ = certificateBuilder_.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.security.privateca.v1beta1.CreateCertificateRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getCertificateId().isEmpty()) { + certificateId_ = other.certificateId_; + onChanged(); + } + if (other.hasCertificate()) { + mergeCertificate(other.getCertificate()); + } + 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.security.privateca.v1beta1.CreateCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format
+     * `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format
+     * `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format
+     * `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format
+     * `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format
+     * `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 certificateId_ = ""; + /** + * + * + *
+     * Optional. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
+     * but is optional and its value is ignored otherwise.
+     * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The certificateId. + */ + public java.lang.String getCertificateId() { + java.lang.Object ref = certificateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
+     * but is optional and its value is ignored otherwise.
+     * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for certificateId. + */ + public com.google.protobuf.ByteString getCertificateIdBytes() { + java.lang.Object ref = certificateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
+     * but is optional and its value is ignored otherwise.
+     * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The certificateId to set. + * @return This builder for chaining. + */ + public Builder setCertificateId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + certificateId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
+     * but is optional and its value is ignored otherwise.
+     * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCertificateId() { + + certificateId_ = getDefaultInstance().getCertificateId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
+     * but is optional and its value is ignored otherwise.
+     * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for certificateId to set. + * @return This builder for chaining. + */ + public Builder setCertificateIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + certificateId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.Certificate certificate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder> + certificateBuilder_; + /** + * + * + *
+     * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + public boolean hasCertificate() { + return certificateBuilder_ != null || certificate_ != null; + } + /** + * + * + *
+     * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + public com.google.cloud.security.privateca.v1beta1.Certificate getCertificate() { + if (certificateBuilder_ == null) { + return certificate_ == null + ? com.google.cloud.security.privateca.v1beta1.Certificate.getDefaultInstance() + : certificate_; + } else { + return certificateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificate(com.google.cloud.security.privateca.v1beta1.Certificate value) { + if (certificateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificate_ = value; + onChanged(); + } else { + certificateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificate( + com.google.cloud.security.privateca.v1beta1.Certificate.Builder builderForValue) { + if (certificateBuilder_ == null) { + certificate_ = builderForValue.build(); + onChanged(); + } else { + certificateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificate(com.google.cloud.security.privateca.v1beta1.Certificate value) { + if (certificateBuilder_ == null) { + if (certificate_ != null) { + certificate_ = + com.google.cloud.security.privateca.v1beta1.Certificate.newBuilder(certificate_) + .mergeFrom(value) + .buildPartial(); + } else { + certificate_ = value; + } + onChanged(); + } else { + certificateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificate() { + if (certificateBuilder_ == null) { + certificate_ = null; + onChanged(); + } else { + certificate_ = null; + certificateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.Certificate.Builder getCertificateBuilder() { + + onChanged(); + return getCertificateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder + getCertificateOrBuilder() { + if (certificateBuilder_ != null) { + return certificateBuilder_.getMessageOrBuilder(); + } else { + return certificate_ == null + ? com.google.cloud.security.privateca.v1beta1.Certificate.getDefaultInstance() + : certificate_; + } + } + /** + * + * + *
+     * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder> + getCertificateFieldBuilder() { + if (certificateBuilder_ == null) { + certificateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder>( + getCertificate(), getParentForChildren(), isClean()); + certificate_ = null; + } + return certificateBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CreateCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CreateCertificateRequest) + private static final com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateCertificateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRequestOrBuilder.java new file mode 100644 index 00000000..583f91f5 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRequestOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface CreateCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CreateCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+   * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format
+   * `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+   * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format
+   * `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
+   * but is optional and its value is ignored otherwise.
+   * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The certificateId. + */ + java.lang.String getCertificateId(); + /** + * + * + *
+   * Optional. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
+   * but is optional and its value is ignored otherwise.
+   * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for certificateId. + */ + com.google.protobuf.ByteString getCertificateIdBytes(); + + /** + * + * + *
+   * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + boolean hasCertificate(); + /** + * + * + *
+   * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + com.google.cloud.security.privateca.v1beta1.Certificate getCertificate(); + /** + * + * + *
+   * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder getCertificateOrBuilder(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRevocationListRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRevocationListRequest.java new file mode 100644 index 00000000..a4a25e70 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRevocationListRequest.java @@ -0,0 +1,1469 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.CreateCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateRevocationList].
+ * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} + */ +public final class CreateCertificateRevocationListRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest) + CreateCertificateRevocationListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCertificateRevocationListRequest.newBuilder() to construct. + private CreateCertificateRevocationListRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCertificateRevocationListRequest() { + parent_ = ""; + certificateRevocationListId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCertificateRevocationListRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateCertificateRevocationListRequest( + 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(); + + certificateRevocationListId_ = s; + break; + } + case 26: + { + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder + subBuilder = null; + if (certificateRevocationList_ != null) { + subBuilder = certificateRevocationList_.toBuilder(); + } + certificateRevocationList_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificateRevocationList_); + certificateRevocationList_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRevocationListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRevocationListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + .class, + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + .Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+   * associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+   * `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+   * associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+   * `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 CERTIFICATE_REVOCATION_LIST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object certificateRevocationListId_; + /** + * + * + *
+   * Required. It must be unique within a location and match the regular expression
+   * `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string certificate_revocation_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateRevocationListId. + */ + @java.lang.Override + public java.lang.String getCertificateRevocationListId() { + java.lang.Object ref = certificateRevocationListId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateRevocationListId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. It must be unique within a location and match the regular expression
+   * `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string certificate_revocation_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for certificateRevocationListId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCertificateRevocationListIdBytes() { + java.lang.Object ref = certificateRevocationListId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateRevocationListId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERTIFICATE_REVOCATION_LIST_FIELD_NUMBER = 3; + private com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + certificateRevocationList_; + /** + * + * + *
+   * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateRevocationList field is set. + */ + @java.lang.Override + public boolean hasCertificateRevocationList() { + return certificateRevocationList_ != null; + } + /** + * + * + *
+   * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateRevocationList. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getCertificateRevocationList() { + return certificateRevocationList_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.getDefaultInstance() + : certificateRevocationList_; + } + /** + * + * + *
+   * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder + getCertificateRevocationListOrBuilder() { + return getCertificateRevocationList(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (!getCertificateRevocationListIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, certificateRevocationListId_); + } + if (certificateRevocationList_ != null) { + output.writeMessage(3, getCertificateRevocationList()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getCertificateRevocationListIdBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(2, certificateRevocationListId_); + } + if (certificateRevocationList_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getCertificateRevocationList()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest other = + (com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getCertificateRevocationListId().equals(other.getCertificateRevocationListId())) + return false; + if (hasCertificateRevocationList() != other.hasCertificateRevocationList()) return false; + if (hasCertificateRevocationList()) { + if (!getCertificateRevocationList().equals(other.getCertificateRevocationList())) + 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(); + hash = (37 * hash) + CERTIFICATE_REVOCATION_LIST_ID_FIELD_NUMBER; + hash = (53 * hash) + getCertificateRevocationListId().hashCode(); + if (hasCertificateRevocationList()) { + hash = (37 * hash) + CERTIFICATE_REVOCATION_LIST_FIELD_NUMBER; + hash = (53 * hash) + getCertificateRevocationList().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.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.CreateCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateRevocationList].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest) + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRevocationListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRevocationListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + .class, + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + certificateRevocationListId_ = ""; + + if (certificateRevocationListBuilder_ == null) { + certificateRevocationList_ = null; + } else { + certificateRevocationList_ = null; + certificateRevocationListBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRevocationListRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + build() { + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest result = + new com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest( + this); + result.parent_ = parent_; + result.certificateRevocationListId_ = certificateRevocationListId_; + if (certificateRevocationListBuilder_ == null) { + result.certificateRevocationList_ = certificateRevocationList_; + } else { + result.certificateRevocationList_ = certificateRevocationListBuilder_.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.security.privateca.v1beta1.CreateCertificateRevocationListRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getCertificateRevocationListId().isEmpty()) { + certificateRevocationListId_ = other.certificateRevocationListId_; + onChanged(); + } + if (other.hasCertificateRevocationList()) { + mergeCertificateRevocationList(other.getCertificateRevocationList()); + } + 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.security.privateca.v1beta1.CreateCertificateRevocationListRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+     * `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+     * `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+     * `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+     * `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+     * associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+     * `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 certificateRevocationListId_ = ""; + /** + * + * + *
+     * Required. It must be unique within a location and match the regular expression
+     * `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string certificate_revocation_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateRevocationListId. + */ + public java.lang.String getCertificateRevocationListId() { + java.lang.Object ref = certificateRevocationListId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateRevocationListId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular expression
+     * `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string certificate_revocation_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for certificateRevocationListId. + */ + public com.google.protobuf.ByteString getCertificateRevocationListIdBytes() { + java.lang.Object ref = certificateRevocationListId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateRevocationListId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular expression
+     * `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string certificate_revocation_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The certificateRevocationListId to set. + * @return This builder for chaining. + */ + public Builder setCertificateRevocationListId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + certificateRevocationListId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular expression
+     * `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string certificate_revocation_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearCertificateRevocationListId() { + + certificateRevocationListId_ = getDefaultInstance().getCertificateRevocationListId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular expression
+     * `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string certificate_revocation_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for certificateRevocationListId to set. + * @return This builder for chaining. + */ + public Builder setCertificateRevocationListIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + certificateRevocationListId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + certificateRevocationList_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder> + certificateRevocationListBuilder_; + /** + * + * + *
+     * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateRevocationList field is set. + */ + public boolean hasCertificateRevocationList() { + return certificateRevocationListBuilder_ != null || certificateRevocationList_ != null; + } + /** + * + * + *
+     * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateRevocationList. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getCertificateRevocationList() { + if (certificateRevocationListBuilder_ == null) { + return certificateRevocationList_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .getDefaultInstance() + : certificateRevocationList_; + } else { + return certificateRevocationListBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList value) { + if (certificateRevocationListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateRevocationList_ = value; + onChanged(); + } else { + certificateRevocationListBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder + builderForValue) { + if (certificateRevocationListBuilder_ == null) { + certificateRevocationList_ = builderForValue.build(); + onChanged(); + } else { + certificateRevocationListBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList value) { + if (certificateRevocationListBuilder_ == null) { + if (certificateRevocationList_ != null) { + certificateRevocationList_ = + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.newBuilder( + certificateRevocationList_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateRevocationList_ = value; + } + onChanged(); + } else { + certificateRevocationListBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificateRevocationList() { + if (certificateRevocationListBuilder_ == null) { + certificateRevocationList_ = null; + onChanged(); + } else { + certificateRevocationList_ = null; + certificateRevocationListBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder + getCertificateRevocationListBuilder() { + + onChanged(); + return getCertificateRevocationListFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder + getCertificateRevocationListOrBuilder() { + if (certificateRevocationListBuilder_ != null) { + return certificateRevocationListBuilder_.getMessageOrBuilder(); + } else { + return certificateRevocationList_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .getDefaultInstance() + : certificateRevocationList_; + } + } + /** + * + * + *
+     * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder> + getCertificateRevocationListFieldBuilder() { + if (certificateRevocationListBuilder_ == null) { + certificateRevocationListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder>( + getCertificateRevocationList(), getParentForChildren(), isClean()); + certificateRevocationList_ = null; + } + return certificateRevocationListBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest) + private static final com.google.cloud.security.privateca.v1beta1 + .CreateCertificateRevocationListRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCertificateRevocationListRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateCertificateRevocationListRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRevocationListRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRevocationListRequestOrBuilder.java new file mode 100644 index 00000000..8cc2b3a2 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateCertificateRevocationListRequestOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface CreateCertificateRevocationListRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+   * associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+   * `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
+   * associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+   * `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. It must be unique within a location and match the regular expression
+   * `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string certificate_revocation_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateRevocationListId. + */ + java.lang.String getCertificateRevocationListId(); + /** + * + * + *
+   * Required. It must be unique within a location and match the regular expression
+   * `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string certificate_revocation_list_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for certificateRevocationListId. + */ + com.google.protobuf.ByteString getCertificateRevocationListIdBytes(); + + /** + * + * + *
+   * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateRevocationList field is set. + */ + boolean hasCertificateRevocationList(); + /** + * + * + *
+   * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateRevocationList. + */ + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getCertificateRevocationList(); + /** + * + * + *
+   * Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder + getCertificateRevocationListOrBuilder(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateReusableConfigRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateReusableConfigRequest.java new file mode 100644 index 00000000..cd92ebd9 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateReusableConfigRequest.java @@ -0,0 +1,1425 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.CreateReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateReusableConfig].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} + */ +public final class CreateReusableConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest) + CreateReusableConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateReusableConfigRequest.newBuilder() to construct. + private CreateReusableConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateReusableConfigRequest() { + parent_ = ""; + reusableConfigId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateReusableConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateReusableConfigRequest( + 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(); + + reusableConfigId_ = s; + break; + } + case 26: + { + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder subBuilder = null; + if (reusableConfig_ != null) { + subBuilder = reusableConfig_.toBuilder(); + } + reusableConfig_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ReusableConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reusableConfig_); + reusableConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateReusableConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateReusableConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.class, + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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 REUSABLE_CONFIG_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object reusableConfigId_; + /** + * + * + *
+   * Required. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string reusable_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reusableConfigId. + */ + @java.lang.Override + public java.lang.String getReusableConfigId() { + java.lang.Object ref = reusableConfigId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reusableConfigId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string reusable_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reusableConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReusableConfigIdBytes() { + java.lang.Object ref = reusableConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reusableConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REUSABLE_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.security.privateca.v1beta1.ReusableConfig reusableConfig_; + /** + * + * + *
+   * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfig field is set. + */ + @java.lang.Override + public boolean hasReusableConfig() { + return reusableConfig_ != null; + } + /** + * + * + *
+   * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfig. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfig getReusableConfig() { + return reusableConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfig.getDefaultInstance() + : reusableConfig_; + } + /** + * + * + *
+   * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder + getReusableConfigOrBuilder() { + return getReusableConfig(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (!getReusableConfigIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, reusableConfigId_); + } + if (reusableConfig_ != null) { + output.writeMessage(3, getReusableConfig()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getReusableConfigIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, reusableConfigId_); + } + if (reusableConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getReusableConfig()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest other = + (com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getReusableConfigId().equals(other.getReusableConfigId())) return false; + if (hasReusableConfig() != other.hasReusableConfig()) return false; + if (hasReusableConfig()) { + if (!getReusableConfig().equals(other.getReusableConfig())) 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(); + hash = (37 * hash) + REUSABLE_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getReusableConfigId().hashCode(); + if (hasReusableConfig()) { + hash = (37 * hash) + REUSABLE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getReusableConfig().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.security.privateca.v1beta1.CreateReusableConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.CreateReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateReusableConfig].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest) + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateReusableConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateReusableConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.class, + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + reusableConfigId_ = ""; + + if (reusableConfigBuilder_ == null) { + reusableConfig_ = null; + } else { + reusableConfig_ = null; + reusableConfigBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_CreateReusableConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest build() { + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest buildPartial() { + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest result = + new com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest(this); + result.parent_ = parent_; + result.reusableConfigId_ = reusableConfigId_; + if (reusableConfigBuilder_ == null) { + result.reusableConfig_ = reusableConfig_; + } else { + result.reusableConfig_ = reusableConfigBuilder_.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.security.privateca.v1beta1.CreateReusableConfigRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getReusableConfigId().isEmpty()) { + reusableConfigId_ = other.reusableConfigId_; + onChanged(); + } + if (other.hasReusableConfig()) { + mergeReusableConfig(other.getReusableConfig()); + } + 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.security.privateca.v1beta1.CreateReusableConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the location associated with the
+     * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 reusableConfigId_ = ""; + /** + * + * + *
+     * Required. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string reusable_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reusableConfigId. + */ + public java.lang.String getReusableConfigId() { + java.lang.Object ref = reusableConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reusableConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string reusable_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reusableConfigId. + */ + public com.google.protobuf.ByteString getReusableConfigIdBytes() { + java.lang.Object ref = reusableConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reusableConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string reusable_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The reusableConfigId to set. + * @return This builder for chaining. + */ + public Builder setReusableConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + reusableConfigId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string reusable_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearReusableConfigId() { + + reusableConfigId_ = getDefaultInstance().getReusableConfigId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. It must be unique within a location and match the regular
+     * expression `[a-zA-Z0-9-]{1,63}`
+     * 
+ * + * string reusable_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for reusableConfigId to set. + * @return This builder for chaining. + */ + public Builder setReusableConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + reusableConfigId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.security.privateca.v1beta1.ReusableConfig reusableConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfig, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder> + reusableConfigBuilder_; + /** + * + * + *
+     * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfig field is set. + */ + public boolean hasReusableConfig() { + return reusableConfigBuilder_ != null || reusableConfig_ != null; + } + /** + * + * + *
+     * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfig. + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfig getReusableConfig() { + if (reusableConfigBuilder_ == null) { + return reusableConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfig.getDefaultInstance() + : reusableConfig_; + } else { + return reusableConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReusableConfig( + com.google.cloud.security.privateca.v1beta1.ReusableConfig value) { + if (reusableConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reusableConfig_ = value; + onChanged(); + } else { + reusableConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReusableConfig( + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder builderForValue) { + if (reusableConfigBuilder_ == null) { + reusableConfig_ = builderForValue.build(); + onChanged(); + } else { + reusableConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeReusableConfig( + com.google.cloud.security.privateca.v1beta1.ReusableConfig value) { + if (reusableConfigBuilder_ == null) { + if (reusableConfig_ != null) { + reusableConfig_ = + com.google.cloud.security.privateca.v1beta1.ReusableConfig.newBuilder(reusableConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + reusableConfig_ = value; + } + onChanged(); + } else { + reusableConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearReusableConfig() { + if (reusableConfigBuilder_ == null) { + reusableConfig_ = null; + onChanged(); + } else { + reusableConfig_ = null; + reusableConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder + getReusableConfigBuilder() { + + onChanged(); + return getReusableConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder + getReusableConfigOrBuilder() { + if (reusableConfigBuilder_ != null) { + return reusableConfigBuilder_.getMessageOrBuilder(); + } else { + return reusableConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfig.getDefaultInstance() + : reusableConfig_; + } + } + /** + * + * + *
+     * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfig, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder> + getReusableConfigFieldBuilder() { + if (reusableConfigBuilder_ == null) { + reusableConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfig, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder>( + getReusableConfig(), getParentForChildren(), isClean()); + reusableConfig_ = null; + } + return reusableConfigBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest) + private static final com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateReusableConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateReusableConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateReusableConfigRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateReusableConfigRequestOrBuilder.java new file mode 100644 index 00000000..e623689d --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/CreateReusableConfigRequestOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface CreateReusableConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string reusable_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reusableConfigId. + */ + java.lang.String getReusableConfigId(); + /** + * + * + *
+   * Required. It must be unique within a location and match the regular
+   * expression `[a-zA-Z0-9-]{1,63}`
+   * 
+ * + * string reusable_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reusableConfigId. + */ + com.google.protobuf.ByteString getReusableConfigIdBytes(); + + /** + * + * + *
+   * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfig field is set. + */ + boolean hasReusableConfig(); + /** + * + * + *
+   * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfig. + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfig getReusableConfig(); + /** + * + * + *
+   * Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder getReusableConfigOrBuilder(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DeleteReusableConfigRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DeleteReusableConfigRequest.java new file mode 100644 index 00000000..81438171 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DeleteReusableConfigRequest.java @@ -0,0 +1,924 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.DeleteReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DeleteReusableConfig].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} + */ +public final class DeleteReusableConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest) + DeleteReusableConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteReusableConfigRequest.newBuilder() to construct. + private DeleteReusableConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteReusableConfigRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteReusableConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteReusableConfigRequest( + 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(); + + 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_DeleteReusableConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_DeleteReusableConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.class, + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * + * 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 for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.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, 2, 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(2, 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.security.privateca.v1beta1.DeleteReusableConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest other = + (com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest) 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.security.privateca.v1beta1.DeleteReusableConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.DeleteReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DeleteReusableConfig].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest) + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_DeleteReusableConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_DeleteReusableConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.class, + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_DeleteReusableConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest build() { + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest buildPartial() { + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest result = + new com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest(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.security.privateca.v1beta1.DeleteReusableConfigRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + .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.security.privateca.v1beta1.DeleteReusableConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * + * 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 for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * + * 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 for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * + * 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 for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * + * 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 for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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.security.privateca.v1beta1.DeleteReusableConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest) + private static final com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteReusableConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteReusableConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DeleteReusableConfigRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DeleteReusableConfigRequestOrBuilder.java new file mode 100644 index 00000000..8d50a035 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DeleteReusableConfigRequestOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface DeleteReusableConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DisableCertificateAuthorityRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DisableCertificateAuthorityRequest.java new file mode 100644 index 00000000..f0bb96df --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DisableCertificateAuthorityRequest.java @@ -0,0 +1,938 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.DisableCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest} + */ +public final class DisableCertificateAuthorityRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest) + DisableCertificateAuthorityRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DisableCertificateAuthorityRequest.newBuilder() to construct. + private DisableCertificateAuthorityRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DisableCertificateAuthorityRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DisableCertificateAuthorityRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DisableCertificateAuthorityRequest( + 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(); + + 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_DisableCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_DisableCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.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, 2, 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(2, 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.security.privateca.v1beta1.DisableCertificateAuthorityRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest other = + (com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest) 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.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.DisableCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest) + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_DisableCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_DisableCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_DisableCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest build() { + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest result = + new com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest(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.security.privateca.v1beta1.DisableCertificateAuthorityRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + .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.security.privateca.v1beta1.DisableCertificateAuthorityRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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.security.privateca.v1beta1.DisableCertificateAuthorityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest) + private static final com.google.cloud.security.privateca.v1beta1 + .DisableCertificateAuthorityRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisableCertificateAuthorityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DisableCertificateAuthorityRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DisableCertificateAuthorityRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DisableCertificateAuthorityRequestOrBuilder.java new file mode 100644 index 00000000..34db727f --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/DisableCertificateAuthorityRequestOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface DisableCertificateAuthorityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/EnableCertificateAuthorityRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/EnableCertificateAuthorityRequest.java new file mode 100644 index 00000000..91509185 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/EnableCertificateAuthorityRequest.java @@ -0,0 +1,935 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.EnableCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest} + */ +public final class EnableCertificateAuthorityRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest) + EnableCertificateAuthorityRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnableCertificateAuthorityRequest.newBuilder() to construct. + private EnableCertificateAuthorityRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnableCertificateAuthorityRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnableCertificateAuthorityRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EnableCertificateAuthorityRequest( + 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(); + + 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_EnableCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_EnableCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.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, 2, 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(2, 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.security.privateca.v1beta1.EnableCertificateAuthorityRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest other = + (com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest) 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.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.EnableCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest) + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_EnableCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_EnableCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_EnableCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest build() { + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest result = + new com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest(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.security.privateca.v1beta1.EnableCertificateAuthorityRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + .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.security.privateca.v1beta1.EnableCertificateAuthorityRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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.security.privateca.v1beta1.EnableCertificateAuthorityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest) + private static final com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnableCertificateAuthorityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EnableCertificateAuthorityRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/EnableCertificateAuthorityRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/EnableCertificateAuthorityRequestOrBuilder.java new file mode 100644 index 00000000..496d274e --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/EnableCertificateAuthorityRequestOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface EnableCertificateAuthorityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrRequest.java new file mode 100644 index 00000000..6944426c --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrRequest.java @@ -0,0 +1,691 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest} + */ +public final class FetchCertificateAuthorityCsrRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest) + FetchCertificateAuthorityCsrRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use FetchCertificateAuthorityCsrRequest.newBuilder() to construct. + private FetchCertificateAuthorityCsrRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FetchCertificateAuthorityCsrRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FetchCertificateAuthorityCsrRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FetchCertificateAuthorityCsrRequest( + 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest.class, + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest other = + (com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest) 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.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest) + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest.class, + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest build() { + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest result = + new com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest(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.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + .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.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest) + private static final com.google.cloud.security.privateca.v1beta1 + .FetchCertificateAuthorityCsrRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchCertificateAuthorityCsrRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FetchCertificateAuthorityCsrRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrRequestOrBuilder.java new file mode 100644 index 00000000..a8535755 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrRequestOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface FetchCertificateAuthorityCsrRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrResponse.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrResponse.java new file mode 100644 index 00000000..f5c928d0 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrResponse.java @@ -0,0 +1,674 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr].
+ * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse} + */ +public final class FetchCertificateAuthorityCsrResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) + FetchCertificateAuthorityCsrResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use FetchCertificateAuthorityCsrResponse.newBuilder() to construct. + private FetchCertificateAuthorityCsrResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FetchCertificateAuthorityCsrResponse() { + pemCsr_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FetchCertificateAuthorityCsrResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FetchCertificateAuthorityCsrResponse( + 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(); + + pemCsr_ = 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.class, + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.Builder + .class); + } + + public static final int PEM_CSR_FIELD_NUMBER = 1; + private volatile java.lang.Object pemCsr_; + /** + * + * + *
+   * Output only. The PEM-encoded signed certificate signing request (CSR).
+   * 
+ * + * string pem_csr = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCsr. + */ + @java.lang.Override + public java.lang.String getPemCsr() { + java.lang.Object ref = pemCsr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCsr_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The PEM-encoded signed certificate signing request (CSR).
+   * 
+ * + * string pem_csr = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCsr. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPemCsrBytes() { + java.lang.Object ref = pemCsr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCsr_ = 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 (!getPemCsrBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pemCsr_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPemCsrBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pemCsr_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse other = + (com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) obj; + + if (!getPemCsr().equals(other.getPemCsr())) return false; + if (!unknownFields.equals(other.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) + PEM_CSR_FIELD_NUMBER; + hash = (53 * hash) + getPemCsr().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + .class, + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + pemCsr_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + build() { + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + buildPartial() { + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse result = + new com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse( + this); + result.pemCsr_ = pemCsr_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse other) { + if (other + == com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + .getDefaultInstance()) return this; + if (!other.getPemCsr().isEmpty()) { + pemCsr_ = other.pemCsr_; + 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.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object pemCsr_ = ""; + /** + * + * + *
+     * Output only. The PEM-encoded signed certificate signing request (CSR).
+     * 
+ * + * string pem_csr = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCsr. + */ + public java.lang.String getPemCsr() { + java.lang.Object ref = pemCsr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCsr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The PEM-encoded signed certificate signing request (CSR).
+     * 
+ * + * string pem_csr = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCsr. + */ + public com.google.protobuf.ByteString getPemCsrBytes() { + java.lang.Object ref = pemCsr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCsr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The PEM-encoded signed certificate signing request (CSR).
+     * 
+ * + * string pem_csr = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pemCsr to set. + * @return This builder for chaining. + */ + public Builder setPemCsr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pemCsr_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PEM-encoded signed certificate signing request (CSR).
+     * 
+ * + * string pem_csr = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPemCsr() { + + pemCsr_ = getDefaultInstance().getPemCsr(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PEM-encoded signed certificate signing request (CSR).
+     * 
+ * + * string pem_csr = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pemCsr to set. + * @return This builder for chaining. + */ + public Builder setPemCsrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pemCsr_ = 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.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) + private static final com.google.cloud.security.privateca.v1beta1 + .FetchCertificateAuthorityCsrResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse(); + } + + public static com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchCertificateAuthorityCsrResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FetchCertificateAuthorityCsrResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrResponseOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrResponseOrBuilder.java new file mode 100644 index 00000000..e1c0bdd4 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/FetchCertificateAuthorityCsrResponseOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface FetchCertificateAuthorityCsrResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The PEM-encoded signed certificate signing request (CSR).
+   * 
+ * + * string pem_csr = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCsr. + */ + java.lang.String getPemCsr(); + /** + * + * + *
+   * Output only. The PEM-encoded signed certificate signing request (CSR).
+   * 
+ * + * string pem_csr = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCsr. + */ + com.google.protobuf.ByteString getPemCsrBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateAuthorityRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateAuthorityRequest.java new file mode 100644 index 00000000..2a007770 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateAuthorityRequest.java @@ -0,0 +1,683 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for [CertificateAuthorityService.GetCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest} + */ +public final class GetCertificateAuthorityRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest) + GetCertificateAuthorityRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCertificateAuthorityRequest.newBuilder() to construct. + private GetCertificateAuthorityRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCertificateAuthorityRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCertificateAuthorityRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetCertificateAuthorityRequest( + 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+   * get.
+   * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+   * get.
+   * 
+ * + * + * 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.security.privateca.v1beta1.GetCertificateAuthorityRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest other = + (com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest) 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.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CertificateAuthorityService.GetCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest) + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest build() { + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest result = + new com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest(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.security.privateca.v1beta1.GetCertificateAuthorityRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + .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.security.privateca.v1beta1.GetCertificateAuthorityRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+     * get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+     * get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+     * get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+     * get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+     * get.
+     * 
+ * + * + * 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.security.privateca.v1beta1.GetCertificateAuthorityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest) + private static final com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCertificateAuthorityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCertificateAuthorityRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateAuthorityRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateAuthorityRequestOrBuilder.java new file mode 100644 index 00000000..86a93a86 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateAuthorityRequestOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface GetCertificateAuthorityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+   * get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+   * get.
+   * 
+ * + * + * 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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRequest.java new file mode 100644 index 00000000..ab52f6f3 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRequest.java @@ -0,0 +1,662 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.GetCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.GetCertificateRequest} + */ +public final class GetCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.GetCertificateRequest) + GetCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCertificateRequest.newBuilder() to construct. + private GetCertificateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCertificateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetCertificateRequest( + 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest.class, + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
+   * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
+   * 
+ * + * + * 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.security.privateca.v1beta1.GetCertificateRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest other = + (com.google.cloud.security.privateca.v1beta1.GetCertificateRequest) 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.security.privateca.v1beta1.GetCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.GetCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.GetCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.GetCertificateRequest) + com.google.cloud.security.privateca.v1beta1.GetCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest.class, + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.GetCertificateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.GetCertificateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateRequest build() { + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateRequest buildPartial() { + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest result = + new com.google.cloud.security.privateca.v1beta1.GetCertificateRequest(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.security.privateca.v1beta1.GetCertificateRequest) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.GetCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.GetCertificateRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.GetCertificateRequest.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.security.privateca.v1beta1.GetCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.GetCertificateRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
+     * 
+ * + * + * 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.security.privateca.v1beta1.GetCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.GetCertificateRequest) + private static final com.google.cloud.security.privateca.v1beta1.GetCertificateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.GetCertificateRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCertificateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRequestOrBuilder.java new file mode 100644 index 00000000..7e15d1a7 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRequestOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface GetCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.GetCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
+   * 
+ * + * + * 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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRevocationListRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRevocationListRequest.java new file mode 100644 index 00000000..6127608d --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRevocationListRequest.java @@ -0,0 +1,691 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.GetCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} + */ +public final class GetCertificateRevocationListRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest) + GetCertificateRevocationListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCertificateRevocationListRequest.newBuilder() to construct. + private GetCertificateRevocationListRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCertificateRevocationListRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCertificateRevocationListRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetCertificateRevocationListRequest( + 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRevocationListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRevocationListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.class, + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
+   * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.
+   * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
+   * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.
+   * 
+ * + * + * 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.security.privateca.v1beta1.GetCertificateRevocationListRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest other = + (com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest) 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.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.GetCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest) + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRevocationListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRevocationListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.class, + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRevocationListRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest build() { + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest result = + new com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest(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.security.privateca.v1beta1.GetCertificateRevocationListRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + .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.security.privateca.v1beta1.GetCertificateRevocationListRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
+     * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
+     * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
+     * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
+     * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.
+     * 
+ * + * + * 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 [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
+     * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.
+     * 
+ * + * + * 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.security.privateca.v1beta1.GetCertificateRevocationListRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest) + private static final com.google.cloud.security.privateca.v1beta1 + .GetCertificateRevocationListRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCertificateRevocationListRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCertificateRevocationListRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRevocationListRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRevocationListRequestOrBuilder.java new file mode 100644 index 00000000..590a7ef4 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetCertificateRevocationListRequestOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface GetCertificateRevocationListRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
+   * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
+   * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.
+   * 
+ * + * + * 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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetReusableConfigRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetReusableConfigRequest.java new file mode 100644 index 00000000..5c1fe2e6 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetReusableConfigRequest.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.GetReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.GetReusableConfigRequest} + */ +public final class GetReusableConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.GetReusableConfigRequest) + GetReusableConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetReusableConfigRequest.newBuilder() to construct. + private GetReusableConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetReusableConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetReusableConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetReusableConfigRequest( + 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetReusableConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetReusableConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest.class, + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
+   * 
+ * + * + * 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 [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
+   * 
+ * + * + * 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.security.privateca.v1beta1.GetReusableConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest other = + (com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest) 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.security.privateca.v1beta1.GetReusableConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.GetReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.GetReusableConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.GetReusableConfigRequest) + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetReusableConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetReusableConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest.class, + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_GetReusableConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest build() { + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest buildPartial() { + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest result = + new com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest(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.security.privateca.v1beta1.GetReusableConfigRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + .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.security.privateca.v1beta1.GetReusableConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
+     * 
+ * + * + * 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 [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
+     * 
+ * + * + * 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 [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
+     * 
+ * + * + * 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 [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
+     * 
+ * + * + * 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 [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
+     * 
+ * + * + * 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.security.privateca.v1beta1.GetReusableConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.GetReusableConfigRequest) + private static final com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetReusableConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetReusableConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetReusableConfigRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetReusableConfigRequestOrBuilder.java new file mode 100644 index 00000000..7ead8052 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/GetReusableConfigRequestOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface GetReusableConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.GetReusableConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
+   * 
+ * + * + * 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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/KeyUsage.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/KeyUsage.java new file mode 100644 index 00000000..2b2d9527 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/KeyUsage.java @@ -0,0 +1,4189 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * A [KeyUsage][google.cloud.security.privateca.v1beta1.KeyUsage] describes key usage values that may appear in an X.509
+ * certificate.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.KeyUsage} + */ +public final class KeyUsage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.KeyUsage) + KeyUsageOrBuilder { + private static final long serialVersionUID = 0L; + // Use KeyUsage.newBuilder() to construct. + private KeyUsage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KeyUsage() { + unknownExtendedKeyUsages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KeyUsage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private KeyUsage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.Builder + subBuilder = null; + if (baseKeyUsage_ != null) { + subBuilder = baseKeyUsage_.toBuilder(); + } + baseKeyUsage_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(baseKeyUsage_); + baseKeyUsage_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.Builder + subBuilder = null; + if (extendedKeyUsage_ != null) { + subBuilder = extendedKeyUsage_.toBuilder(); + } + extendedKeyUsage_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(extendedKeyUsage_); + extendedKeyUsage_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + unknownExtendedKeyUsages_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + unknownExtendedKeyUsages_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ObjectId.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)) { + unknownExtendedKeyUsages_ = + java.util.Collections.unmodifiableList(unknownExtendedKeyUsages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.KeyUsage.class, + com.google.cloud.security.privateca.v1beta1.KeyUsage.Builder.class); + } + + public interface KeyUsageOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The key may be used for digital signatures.
+     * 
+ * + * bool digital_signature = 1; + * + * @return The digitalSignature. + */ + boolean getDigitalSignature(); + + /** + * + * + *
+     * The key may be used for cryptographic commitments. Note that this may
+     * also be referred to as "non-repudiation".
+     * 
+ * + * bool content_commitment = 2; + * + * @return The contentCommitment. + */ + boolean getContentCommitment(); + + /** + * + * + *
+     * The key may be used to encipher other keys.
+     * 
+ * + * bool key_encipherment = 3; + * + * @return The keyEncipherment. + */ + boolean getKeyEncipherment(); + + /** + * + * + *
+     * The key may be used to encipher data.
+     * 
+ * + * bool data_encipherment = 4; + * + * @return The dataEncipherment. + */ + boolean getDataEncipherment(); + + /** + * + * + *
+     * The key may be used in a key agreement protocol.
+     * 
+ * + * bool key_agreement = 5; + * + * @return The keyAgreement. + */ + boolean getKeyAgreement(); + + /** + * + * + *
+     * The key may be used to sign certificates.
+     * 
+ * + * bool cert_sign = 6; + * + * @return The certSign. + */ + boolean getCertSign(); + + /** + * + * + *
+     * The key may be used sign certificate revocation lists.
+     * 
+ * + * bool crl_sign = 7; + * + * @return The crlSign. + */ + boolean getCrlSign(); + + /** + * + * + *
+     * The key may be used to encipher only.
+     * 
+ * + * bool encipher_only = 8; + * + * @return The encipherOnly. + */ + boolean getEncipherOnly(); + + /** + * + * + *
+     * The key may be used to decipher only.
+     * 
+ * + * bool decipher_only = 9; + * + * @return The decipherOnly. + */ + boolean getDecipherOnly(); + } + /** + * + * + *
+   * [KeyUsage.KeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions] corresponds to the key usage values
+   * described in https://tools.ietf.org/html/rfc5280#section-4.2.1.3.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions} + */ + public static final class KeyUsageOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions) + KeyUsageOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use KeyUsageOptions.newBuilder() to construct. + private KeyUsageOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KeyUsageOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KeyUsageOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private KeyUsageOptions( + 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: + { + digitalSignature_ = input.readBool(); + break; + } + case 16: + { + contentCommitment_ = input.readBool(); + break; + } + case 24: + { + keyEncipherment_ = input.readBool(); + break; + } + case 32: + { + dataEncipherment_ = input.readBool(); + break; + } + case 40: + { + keyAgreement_ = input.readBool(); + break; + } + case 48: + { + certSign_ = input.readBool(); + break; + } + case 56: + { + crlSign_ = input.readBool(); + break; + } + case 64: + { + encipherOnly_ = input.readBool(); + break; + } + case 72: + { + decipherOnly_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_KeyUsageOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_KeyUsageOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.class, + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.Builder.class); + } + + public static final int DIGITAL_SIGNATURE_FIELD_NUMBER = 1; + private boolean digitalSignature_; + /** + * + * + *
+     * The key may be used for digital signatures.
+     * 
+ * + * bool digital_signature = 1; + * + * @return The digitalSignature. + */ + @java.lang.Override + public boolean getDigitalSignature() { + return digitalSignature_; + } + + public static final int CONTENT_COMMITMENT_FIELD_NUMBER = 2; + private boolean contentCommitment_; + /** + * + * + *
+     * The key may be used for cryptographic commitments. Note that this may
+     * also be referred to as "non-repudiation".
+     * 
+ * + * bool content_commitment = 2; + * + * @return The contentCommitment. + */ + @java.lang.Override + public boolean getContentCommitment() { + return contentCommitment_; + } + + public static final int KEY_ENCIPHERMENT_FIELD_NUMBER = 3; + private boolean keyEncipherment_; + /** + * + * + *
+     * The key may be used to encipher other keys.
+     * 
+ * + * bool key_encipherment = 3; + * + * @return The keyEncipherment. + */ + @java.lang.Override + public boolean getKeyEncipherment() { + return keyEncipherment_; + } + + public static final int DATA_ENCIPHERMENT_FIELD_NUMBER = 4; + private boolean dataEncipherment_; + /** + * + * + *
+     * The key may be used to encipher data.
+     * 
+ * + * bool data_encipherment = 4; + * + * @return The dataEncipherment. + */ + @java.lang.Override + public boolean getDataEncipherment() { + return dataEncipherment_; + } + + public static final int KEY_AGREEMENT_FIELD_NUMBER = 5; + private boolean keyAgreement_; + /** + * + * + *
+     * The key may be used in a key agreement protocol.
+     * 
+ * + * bool key_agreement = 5; + * + * @return The keyAgreement. + */ + @java.lang.Override + public boolean getKeyAgreement() { + return keyAgreement_; + } + + public static final int CERT_SIGN_FIELD_NUMBER = 6; + private boolean certSign_; + /** + * + * + *
+     * The key may be used to sign certificates.
+     * 
+ * + * bool cert_sign = 6; + * + * @return The certSign. + */ + @java.lang.Override + public boolean getCertSign() { + return certSign_; + } + + public static final int CRL_SIGN_FIELD_NUMBER = 7; + private boolean crlSign_; + /** + * + * + *
+     * The key may be used sign certificate revocation lists.
+     * 
+ * + * bool crl_sign = 7; + * + * @return The crlSign. + */ + @java.lang.Override + public boolean getCrlSign() { + return crlSign_; + } + + public static final int ENCIPHER_ONLY_FIELD_NUMBER = 8; + private boolean encipherOnly_; + /** + * + * + *
+     * The key may be used to encipher only.
+     * 
+ * + * bool encipher_only = 8; + * + * @return The encipherOnly. + */ + @java.lang.Override + public boolean getEncipherOnly() { + return encipherOnly_; + } + + public static final int DECIPHER_ONLY_FIELD_NUMBER = 9; + private boolean decipherOnly_; + /** + * + * + *
+     * The key may be used to decipher only.
+     * 
+ * + * bool decipher_only = 9; + * + * @return The decipherOnly. + */ + @java.lang.Override + public boolean getDecipherOnly() { + return decipherOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (digitalSignature_ != false) { + output.writeBool(1, digitalSignature_); + } + if (contentCommitment_ != false) { + output.writeBool(2, contentCommitment_); + } + if (keyEncipherment_ != false) { + output.writeBool(3, keyEncipherment_); + } + if (dataEncipherment_ != false) { + output.writeBool(4, dataEncipherment_); + } + if (keyAgreement_ != false) { + output.writeBool(5, keyAgreement_); + } + if (certSign_ != false) { + output.writeBool(6, certSign_); + } + if (crlSign_ != false) { + output.writeBool(7, crlSign_); + } + if (encipherOnly_ != false) { + output.writeBool(8, encipherOnly_); + } + if (decipherOnly_ != false) { + output.writeBool(9, decipherOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (digitalSignature_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, digitalSignature_); + } + if (contentCommitment_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, contentCommitment_); + } + if (keyEncipherment_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, keyEncipherment_); + } + if (dataEncipherment_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, dataEncipherment_); + } + if (keyAgreement_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, keyAgreement_); + } + if (certSign_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, certSign_); + } + if (crlSign_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, crlSign_); + } + if (encipherOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, encipherOnly_); + } + if (decipherOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, decipherOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions other = + (com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions) obj; + + if (getDigitalSignature() != other.getDigitalSignature()) return false; + if (getContentCommitment() != other.getContentCommitment()) return false; + if (getKeyEncipherment() != other.getKeyEncipherment()) return false; + if (getDataEncipherment() != other.getDataEncipherment()) return false; + if (getKeyAgreement() != other.getKeyAgreement()) return false; + if (getCertSign() != other.getCertSign()) return false; + if (getCrlSign() != other.getCrlSign()) return false; + if (getEncipherOnly() != other.getEncipherOnly()) return false; + if (getDecipherOnly() != other.getDecipherOnly()) return false; + if (!unknownFields.equals(other.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) + DIGITAL_SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDigitalSignature()); + hash = (37 * hash) + CONTENT_COMMITMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getContentCommitment()); + hash = (37 * hash) + KEY_ENCIPHERMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getKeyEncipherment()); + hash = (37 * hash) + DATA_ENCIPHERMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDataEncipherment()); + hash = (37 * hash) + KEY_AGREEMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getKeyAgreement()); + hash = (37 * hash) + CERT_SIGN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCertSign()); + hash = (37 * hash) + CRL_SIGN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCrlSign()); + hash = (37 * hash) + ENCIPHER_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEncipherOnly()); + hash = (37 * hash) + DECIPHER_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDecipherOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * [KeyUsage.KeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions] corresponds to the key usage values
+     * described in https://tools.ietf.org/html/rfc5280#section-4.2.1.3.
+     * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions) + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_KeyUsageOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_KeyUsageOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.class, + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + digitalSignature_ = false; + + contentCommitment_ = false; + + keyEncipherment_ = false; + + dataEncipherment_ = false; + + keyAgreement_ = false; + + certSign_ = false; + + crlSign_ = false; + + encipherOnly_ = false; + + decipherOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_KeyUsageOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions build() { + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions buildPartial() { + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions result = + new com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions(this); + result.digitalSignature_ = digitalSignature_; + result.contentCommitment_ = contentCommitment_; + result.keyEncipherment_ = keyEncipherment_; + result.dataEncipherment_ = dataEncipherment_; + result.keyAgreement_ = keyAgreement_; + result.certSign_ = certSign_; + result.crlSign_ = crlSign_; + result.encipherOnly_ = encipherOnly_; + result.decipherOnly_ = decipherOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions other) { + if (other + == com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + .getDefaultInstance()) return this; + if (other.getDigitalSignature() != false) { + setDigitalSignature(other.getDigitalSignature()); + } + if (other.getContentCommitment() != false) { + setContentCommitment(other.getContentCommitment()); + } + if (other.getKeyEncipherment() != false) { + setKeyEncipherment(other.getKeyEncipherment()); + } + if (other.getDataEncipherment() != false) { + setDataEncipherment(other.getDataEncipherment()); + } + if (other.getKeyAgreement() != false) { + setKeyAgreement(other.getKeyAgreement()); + } + if (other.getCertSign() != false) { + setCertSign(other.getCertSign()); + } + if (other.getCrlSign() != false) { + setCrlSign(other.getCrlSign()); + } + if (other.getEncipherOnly() != false) { + setEncipherOnly(other.getEncipherOnly()); + } + if (other.getDecipherOnly() != false) { + setDecipherOnly(other.getDecipherOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean digitalSignature_; + /** + * + * + *
+       * The key may be used for digital signatures.
+       * 
+ * + * bool digital_signature = 1; + * + * @return The digitalSignature. + */ + @java.lang.Override + public boolean getDigitalSignature() { + return digitalSignature_; + } + /** + * + * + *
+       * The key may be used for digital signatures.
+       * 
+ * + * bool digital_signature = 1; + * + * @param value The digitalSignature to set. + * @return This builder for chaining. + */ + public Builder setDigitalSignature(boolean value) { + + digitalSignature_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The key may be used for digital signatures.
+       * 
+ * + * bool digital_signature = 1; + * + * @return This builder for chaining. + */ + public Builder clearDigitalSignature() { + + digitalSignature_ = false; + onChanged(); + return this; + } + + private boolean contentCommitment_; + /** + * + * + *
+       * The key may be used for cryptographic commitments. Note that this may
+       * also be referred to as "non-repudiation".
+       * 
+ * + * bool content_commitment = 2; + * + * @return The contentCommitment. + */ + @java.lang.Override + public boolean getContentCommitment() { + return contentCommitment_; + } + /** + * + * + *
+       * The key may be used for cryptographic commitments. Note that this may
+       * also be referred to as "non-repudiation".
+       * 
+ * + * bool content_commitment = 2; + * + * @param value The contentCommitment to set. + * @return This builder for chaining. + */ + public Builder setContentCommitment(boolean value) { + + contentCommitment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The key may be used for cryptographic commitments. Note that this may
+       * also be referred to as "non-repudiation".
+       * 
+ * + * bool content_commitment = 2; + * + * @return This builder for chaining. + */ + public Builder clearContentCommitment() { + + contentCommitment_ = false; + onChanged(); + return this; + } + + private boolean keyEncipherment_; + /** + * + * + *
+       * The key may be used to encipher other keys.
+       * 
+ * + * bool key_encipherment = 3; + * + * @return The keyEncipherment. + */ + @java.lang.Override + public boolean getKeyEncipherment() { + return keyEncipherment_; + } + /** + * + * + *
+       * The key may be used to encipher other keys.
+       * 
+ * + * bool key_encipherment = 3; + * + * @param value The keyEncipherment to set. + * @return This builder for chaining. + */ + public Builder setKeyEncipherment(boolean value) { + + keyEncipherment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The key may be used to encipher other keys.
+       * 
+ * + * bool key_encipherment = 3; + * + * @return This builder for chaining. + */ + public Builder clearKeyEncipherment() { + + keyEncipherment_ = false; + onChanged(); + return this; + } + + private boolean dataEncipherment_; + /** + * + * + *
+       * The key may be used to encipher data.
+       * 
+ * + * bool data_encipherment = 4; + * + * @return The dataEncipherment. + */ + @java.lang.Override + public boolean getDataEncipherment() { + return dataEncipherment_; + } + /** + * + * + *
+       * The key may be used to encipher data.
+       * 
+ * + * bool data_encipherment = 4; + * + * @param value The dataEncipherment to set. + * @return This builder for chaining. + */ + public Builder setDataEncipherment(boolean value) { + + dataEncipherment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The key may be used to encipher data.
+       * 
+ * + * bool data_encipherment = 4; + * + * @return This builder for chaining. + */ + public Builder clearDataEncipherment() { + + dataEncipherment_ = false; + onChanged(); + return this; + } + + private boolean keyAgreement_; + /** + * + * + *
+       * The key may be used in a key agreement protocol.
+       * 
+ * + * bool key_agreement = 5; + * + * @return The keyAgreement. + */ + @java.lang.Override + public boolean getKeyAgreement() { + return keyAgreement_; + } + /** + * + * + *
+       * The key may be used in a key agreement protocol.
+       * 
+ * + * bool key_agreement = 5; + * + * @param value The keyAgreement to set. + * @return This builder for chaining. + */ + public Builder setKeyAgreement(boolean value) { + + keyAgreement_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The key may be used in a key agreement protocol.
+       * 
+ * + * bool key_agreement = 5; + * + * @return This builder for chaining. + */ + public Builder clearKeyAgreement() { + + keyAgreement_ = false; + onChanged(); + return this; + } + + private boolean certSign_; + /** + * + * + *
+       * The key may be used to sign certificates.
+       * 
+ * + * bool cert_sign = 6; + * + * @return The certSign. + */ + @java.lang.Override + public boolean getCertSign() { + return certSign_; + } + /** + * + * + *
+       * The key may be used to sign certificates.
+       * 
+ * + * bool cert_sign = 6; + * + * @param value The certSign to set. + * @return This builder for chaining. + */ + public Builder setCertSign(boolean value) { + + certSign_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The key may be used to sign certificates.
+       * 
+ * + * bool cert_sign = 6; + * + * @return This builder for chaining. + */ + public Builder clearCertSign() { + + certSign_ = false; + onChanged(); + return this; + } + + private boolean crlSign_; + /** + * + * + *
+       * The key may be used sign certificate revocation lists.
+       * 
+ * + * bool crl_sign = 7; + * + * @return The crlSign. + */ + @java.lang.Override + public boolean getCrlSign() { + return crlSign_; + } + /** + * + * + *
+       * The key may be used sign certificate revocation lists.
+       * 
+ * + * bool crl_sign = 7; + * + * @param value The crlSign to set. + * @return This builder for chaining. + */ + public Builder setCrlSign(boolean value) { + + crlSign_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The key may be used sign certificate revocation lists.
+       * 
+ * + * bool crl_sign = 7; + * + * @return This builder for chaining. + */ + public Builder clearCrlSign() { + + crlSign_ = false; + onChanged(); + return this; + } + + private boolean encipherOnly_; + /** + * + * + *
+       * The key may be used to encipher only.
+       * 
+ * + * bool encipher_only = 8; + * + * @return The encipherOnly. + */ + @java.lang.Override + public boolean getEncipherOnly() { + return encipherOnly_; + } + /** + * + * + *
+       * The key may be used to encipher only.
+       * 
+ * + * bool encipher_only = 8; + * + * @param value The encipherOnly to set. + * @return This builder for chaining. + */ + public Builder setEncipherOnly(boolean value) { + + encipherOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The key may be used to encipher only.
+       * 
+ * + * bool encipher_only = 8; + * + * @return This builder for chaining. + */ + public Builder clearEncipherOnly() { + + encipherOnly_ = false; + onChanged(); + return this; + } + + private boolean decipherOnly_; + /** + * + * + *
+       * The key may be used to decipher only.
+       * 
+ * + * bool decipher_only = 9; + * + * @return The decipherOnly. + */ + @java.lang.Override + public boolean getDecipherOnly() { + return decipherOnly_; + } + /** + * + * + *
+       * The key may be used to decipher only.
+       * 
+ * + * bool decipher_only = 9; + * + * @param value The decipherOnly to set. + * @return This builder for chaining. + */ + public Builder setDecipherOnly(boolean value) { + + decipherOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The key may be used to decipher only.
+       * 
+ * + * bool decipher_only = 9; + * + * @return This builder for chaining. + */ + public Builder clearDecipherOnly() { + + decipherOnly_ = 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.security.privateca.v1beta1.KeyUsage.KeyUsageOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions) + private static final com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions(); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeyUsageOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KeyUsageOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExtendedKeyUsageOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW
+     * server authentication", though regularly used for non-WWW TLS.
+     * 
+ * + * bool server_auth = 1; + * + * @return The serverAuth. + */ + boolean getServerAuth(); + + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW
+     * client authentication", though regularly used for non-WWW TLS.
+     * 
+ * + * bool client_auth = 2; + * + * @return The clientAuth. + */ + boolean getClientAuth(); + + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of
+     * downloadable executable code client authentication".
+     * 
+ * + * bool code_signing = 3; + * + * @return The codeSigning. + */ + boolean getCodeSigning(); + + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email
+     * protection".
+     * 
+ * + * bool email_protection = 4; + * + * @return The emailProtection. + */ + boolean getEmailProtection(); + + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding
+     * the hash of an object to a time".
+     * 
+ * + * bool time_stamping = 5; + * + * @return The timeStamping. + */ + boolean getTimeStamping(); + + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing
+     * OCSP responses".
+     * 
+ * + * bool ocsp_signing = 6; + * + * @return The ocspSigning. + */ + boolean getOcspSigning(); + } + /** + * + * + *
+   * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] has fields that correspond to
+   * certain common OIDs that could be specified as an extended key usage value.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions} + */ + public static final class ExtendedKeyUsageOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions) + ExtendedKeyUsageOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExtendedKeyUsageOptions.newBuilder() to construct. + private ExtendedKeyUsageOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExtendedKeyUsageOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExtendedKeyUsageOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExtendedKeyUsageOptions( + 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: + { + serverAuth_ = input.readBool(); + break; + } + case 16: + { + clientAuth_ = input.readBool(); + break; + } + case 24: + { + codeSigning_ = input.readBool(); + break; + } + case 32: + { + emailProtection_ = input.readBool(); + break; + } + case 40: + { + timeStamping_ = input.readBool(); + break; + } + case 48: + { + ocspSigning_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_ExtendedKeyUsageOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_ExtendedKeyUsageOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.class, + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.Builder + .class); + } + + public static final int SERVER_AUTH_FIELD_NUMBER = 1; + private boolean serverAuth_; + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW
+     * server authentication", though regularly used for non-WWW TLS.
+     * 
+ * + * bool server_auth = 1; + * + * @return The serverAuth. + */ + @java.lang.Override + public boolean getServerAuth() { + return serverAuth_; + } + + public static final int CLIENT_AUTH_FIELD_NUMBER = 2; + private boolean clientAuth_; + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW
+     * client authentication", though regularly used for non-WWW TLS.
+     * 
+ * + * bool client_auth = 2; + * + * @return The clientAuth. + */ + @java.lang.Override + public boolean getClientAuth() { + return clientAuth_; + } + + public static final int CODE_SIGNING_FIELD_NUMBER = 3; + private boolean codeSigning_; + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of
+     * downloadable executable code client authentication".
+     * 
+ * + * bool code_signing = 3; + * + * @return The codeSigning. + */ + @java.lang.Override + public boolean getCodeSigning() { + return codeSigning_; + } + + public static final int EMAIL_PROTECTION_FIELD_NUMBER = 4; + private boolean emailProtection_; + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email
+     * protection".
+     * 
+ * + * bool email_protection = 4; + * + * @return The emailProtection. + */ + @java.lang.Override + public boolean getEmailProtection() { + return emailProtection_; + } + + public static final int TIME_STAMPING_FIELD_NUMBER = 5; + private boolean timeStamping_; + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding
+     * the hash of an object to a time".
+     * 
+ * + * bool time_stamping = 5; + * + * @return The timeStamping. + */ + @java.lang.Override + public boolean getTimeStamping() { + return timeStamping_; + } + + public static final int OCSP_SIGNING_FIELD_NUMBER = 6; + private boolean ocspSigning_; + /** + * + * + *
+     * Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing
+     * OCSP responses".
+     * 
+ * + * bool ocsp_signing = 6; + * + * @return The ocspSigning. + */ + @java.lang.Override + public boolean getOcspSigning() { + return ocspSigning_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (serverAuth_ != false) { + output.writeBool(1, serverAuth_); + } + if (clientAuth_ != false) { + output.writeBool(2, clientAuth_); + } + if (codeSigning_ != false) { + output.writeBool(3, codeSigning_); + } + if (emailProtection_ != false) { + output.writeBool(4, emailProtection_); + } + if (timeStamping_ != false) { + output.writeBool(5, timeStamping_); + } + if (ocspSigning_ != false) { + output.writeBool(6, ocspSigning_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (serverAuth_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, serverAuth_); + } + if (clientAuth_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, clientAuth_); + } + if (codeSigning_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, codeSigning_); + } + if (emailProtection_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, emailProtection_); + } + if (timeStamping_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, timeStamping_); + } + if (ocspSigning_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, ocspSigning_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions other = + (com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions) obj; + + if (getServerAuth() != other.getServerAuth()) return false; + if (getClientAuth() != other.getClientAuth()) return false; + if (getCodeSigning() != other.getCodeSigning()) return false; + if (getEmailProtection() != other.getEmailProtection()) return false; + if (getTimeStamping() != other.getTimeStamping()) return false; + if (getOcspSigning() != other.getOcspSigning()) return false; + if (!unknownFields.equals(other.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) + SERVER_AUTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getServerAuth()); + hash = (37 * hash) + CLIENT_AUTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getClientAuth()); + hash = (37 * hash) + CODE_SIGNING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCodeSigning()); + hash = (37 * hash) + EMAIL_PROTECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEmailProtection()); + hash = (37 * hash) + TIME_STAMPING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTimeStamping()); + hash = (37 * hash) + OCSP_SIGNING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOcspSigning()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] has fields that correspond to
+     * certain common OIDs that could be specified as an extended key usage value.
+     * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions) + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_ExtendedKeyUsageOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_ExtendedKeyUsageOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.class, + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serverAuth_ = false; + + clientAuth_ = false; + + codeSigning_ = false; + + emailProtection_ = false; + + timeStamping_ = false; + + ocspSigning_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_ExtendedKeyUsageOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions build() { + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + buildPartial() { + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions result = + new com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions(this); + result.serverAuth_ = serverAuth_; + result.clientAuth_ = clientAuth_; + result.codeSigning_ = codeSigning_; + result.emailProtection_ = emailProtection_; + result.timeStamping_ = timeStamping_; + result.ocspSigning_ = ocspSigning_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions other) { + if (other + == com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + .getDefaultInstance()) return this; + if (other.getServerAuth() != false) { + setServerAuth(other.getServerAuth()); + } + if (other.getClientAuth() != false) { + setClientAuth(other.getClientAuth()); + } + if (other.getCodeSigning() != false) { + setCodeSigning(other.getCodeSigning()); + } + if (other.getEmailProtection() != false) { + setEmailProtection(other.getEmailProtection()); + } + if (other.getTimeStamping() != false) { + setTimeStamping(other.getTimeStamping()); + } + if (other.getOcspSigning() != false) { + setOcspSigning(other.getOcspSigning()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean serverAuth_; + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW
+       * server authentication", though regularly used for non-WWW TLS.
+       * 
+ * + * bool server_auth = 1; + * + * @return The serverAuth. + */ + @java.lang.Override + public boolean getServerAuth() { + return serverAuth_; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW
+       * server authentication", though regularly used for non-WWW TLS.
+       * 
+ * + * bool server_auth = 1; + * + * @param value The serverAuth to set. + * @return This builder for chaining. + */ + public Builder setServerAuth(boolean value) { + + serverAuth_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW
+       * server authentication", though regularly used for non-WWW TLS.
+       * 
+ * + * bool server_auth = 1; + * + * @return This builder for chaining. + */ + public Builder clearServerAuth() { + + serverAuth_ = false; + onChanged(); + return this; + } + + private boolean clientAuth_; + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW
+       * client authentication", though regularly used for non-WWW TLS.
+       * 
+ * + * bool client_auth = 2; + * + * @return The clientAuth. + */ + @java.lang.Override + public boolean getClientAuth() { + return clientAuth_; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW
+       * client authentication", though regularly used for non-WWW TLS.
+       * 
+ * + * bool client_auth = 2; + * + * @param value The clientAuth to set. + * @return This builder for chaining. + */ + public Builder setClientAuth(boolean value) { + + clientAuth_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW
+       * client authentication", though regularly used for non-WWW TLS.
+       * 
+ * + * bool client_auth = 2; + * + * @return This builder for chaining. + */ + public Builder clearClientAuth() { + + clientAuth_ = false; + onChanged(); + return this; + } + + private boolean codeSigning_; + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of
+       * downloadable executable code client authentication".
+       * 
+ * + * bool code_signing = 3; + * + * @return The codeSigning. + */ + @java.lang.Override + public boolean getCodeSigning() { + return codeSigning_; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of
+       * downloadable executable code client authentication".
+       * 
+ * + * bool code_signing = 3; + * + * @param value The codeSigning to set. + * @return This builder for chaining. + */ + public Builder setCodeSigning(boolean value) { + + codeSigning_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of
+       * downloadable executable code client authentication".
+       * 
+ * + * bool code_signing = 3; + * + * @return This builder for chaining. + */ + public Builder clearCodeSigning() { + + codeSigning_ = false; + onChanged(); + return this; + } + + private boolean emailProtection_; + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email
+       * protection".
+       * 
+ * + * bool email_protection = 4; + * + * @return The emailProtection. + */ + @java.lang.Override + public boolean getEmailProtection() { + return emailProtection_; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email
+       * protection".
+       * 
+ * + * bool email_protection = 4; + * + * @param value The emailProtection to set. + * @return This builder for chaining. + */ + public Builder setEmailProtection(boolean value) { + + emailProtection_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email
+       * protection".
+       * 
+ * + * bool email_protection = 4; + * + * @return This builder for chaining. + */ + public Builder clearEmailProtection() { + + emailProtection_ = false; + onChanged(); + return this; + } + + private boolean timeStamping_; + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding
+       * the hash of an object to a time".
+       * 
+ * + * bool time_stamping = 5; + * + * @return The timeStamping. + */ + @java.lang.Override + public boolean getTimeStamping() { + return timeStamping_; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding
+       * the hash of an object to a time".
+       * 
+ * + * bool time_stamping = 5; + * + * @param value The timeStamping to set. + * @return This builder for chaining. + */ + public Builder setTimeStamping(boolean value) { + + timeStamping_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding
+       * the hash of an object to a time".
+       * 
+ * + * bool time_stamping = 5; + * + * @return This builder for chaining. + */ + public Builder clearTimeStamping() { + + timeStamping_ = false; + onChanged(); + return this; + } + + private boolean ocspSigning_; + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing
+       * OCSP responses".
+       * 
+ * + * bool ocsp_signing = 6; + * + * @return The ocspSigning. + */ + @java.lang.Override + public boolean getOcspSigning() { + return ocspSigning_; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing
+       * OCSP responses".
+       * 
+ * + * bool ocsp_signing = 6; + * + * @param value The ocspSigning to set. + * @return This builder for chaining. + */ + public Builder setOcspSigning(boolean value) { + + ocspSigning_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing
+       * OCSP responses".
+       * 
+ * + * bool ocsp_signing = 6; + * + * @return This builder for chaining. + */ + public Builder clearOcspSigning() { + + ocspSigning_ = 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.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions) + private static final com.google.cloud.security.privateca.v1beta1.KeyUsage + .ExtendedKeyUsageOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions(); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExtendedKeyUsageOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExtendedKeyUsageOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BASE_KEY_USAGE_FIELD_NUMBER = 1; + private com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions baseKeyUsage_; + /** + * + * + *
+   * Describes high-level ways in which a key may be used.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + * + * @return Whether the baseKeyUsage field is set. + */ + @java.lang.Override + public boolean hasBaseKeyUsage() { + return baseKeyUsage_ != null; + } + /** + * + * + *
+   * Describes high-level ways in which a key may be used.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + * + * @return The baseKeyUsage. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions getBaseKeyUsage() { + return baseKeyUsage_ == null + ? com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.getDefaultInstance() + : baseKeyUsage_; + } + /** + * + * + *
+   * Describes high-level ways in which a key may be used.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptionsOrBuilder + getBaseKeyUsageOrBuilder() { + return getBaseKeyUsage(); + } + + public static final int EXTENDED_KEY_USAGE_FIELD_NUMBER = 2; + private com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + extendedKeyUsage_; + /** + * + * + *
+   * Detailed scenarios in which a key may be used.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + * + * @return Whether the extendedKeyUsage field is set. + */ + @java.lang.Override + public boolean hasExtendedKeyUsage() { + return extendedKeyUsage_ != null; + } + /** + * + * + *
+   * Detailed scenarios in which a key may be used.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + * + * @return The extendedKeyUsage. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + getExtendedKeyUsage() { + return extendedKeyUsage_ == null + ? com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + .getDefaultInstance() + : extendedKeyUsage_; + } + /** + * + * + *
+   * Detailed scenarios in which a key may be used.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptionsOrBuilder + getExtendedKeyUsageOrBuilder() { + return getExtendedKeyUsage(); + } + + public static final int UNKNOWN_EXTENDED_KEY_USAGES_FIELD_NUMBER = 3; + private java.util.List + unknownExtendedKeyUsages_; + /** + * + * + *
+   * Used to describe extended key usages that are not listed in the
+   * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + @java.lang.Override + public java.util.List + getUnknownExtendedKeyUsagesList() { + return unknownExtendedKeyUsages_; + } + /** + * + * + *
+   * Used to describe extended key usages that are not listed in the
+   * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + @java.lang.Override + public java.util.List + getUnknownExtendedKeyUsagesOrBuilderList() { + return unknownExtendedKeyUsages_; + } + /** + * + * + *
+   * Used to describe extended key usages that are not listed in the
+   * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + @java.lang.Override + public int getUnknownExtendedKeyUsagesCount() { + return unknownExtendedKeyUsages_.size(); + } + /** + * + * + *
+   * Used to describe extended key usages that are not listed in the
+   * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ObjectId getUnknownExtendedKeyUsages( + int index) { + return unknownExtendedKeyUsages_.get(index); + } + /** + * + * + *
+   * Used to describe extended key usages that are not listed in the
+   * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder + getUnknownExtendedKeyUsagesOrBuilder(int index) { + return unknownExtendedKeyUsages_.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 (baseKeyUsage_ != null) { + output.writeMessage(1, getBaseKeyUsage()); + } + if (extendedKeyUsage_ != null) { + output.writeMessage(2, getExtendedKeyUsage()); + } + for (int i = 0; i < unknownExtendedKeyUsages_.size(); i++) { + output.writeMessage(3, unknownExtendedKeyUsages_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (baseKeyUsage_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBaseKeyUsage()); + } + if (extendedKeyUsage_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExtendedKeyUsage()); + } + for (int i = 0; i < unknownExtendedKeyUsages_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, unknownExtendedKeyUsages_.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.security.privateca.v1beta1.KeyUsage)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.KeyUsage other = + (com.google.cloud.security.privateca.v1beta1.KeyUsage) obj; + + if (hasBaseKeyUsage() != other.hasBaseKeyUsage()) return false; + if (hasBaseKeyUsage()) { + if (!getBaseKeyUsage().equals(other.getBaseKeyUsage())) return false; + } + if (hasExtendedKeyUsage() != other.hasExtendedKeyUsage()) return false; + if (hasExtendedKeyUsage()) { + if (!getExtendedKeyUsage().equals(other.getExtendedKeyUsage())) return false; + } + if (!getUnknownExtendedKeyUsagesList().equals(other.getUnknownExtendedKeyUsagesList())) + return false; + if (!unknownFields.equals(other.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 (hasBaseKeyUsage()) { + hash = (37 * hash) + BASE_KEY_USAGE_FIELD_NUMBER; + hash = (53 * hash) + getBaseKeyUsage().hashCode(); + } + if (hasExtendedKeyUsage()) { + hash = (37 * hash) + EXTENDED_KEY_USAGE_FIELD_NUMBER; + hash = (53 * hash) + getExtendedKeyUsage().hashCode(); + } + if (getUnknownExtendedKeyUsagesCount() > 0) { + hash = (37 * hash) + UNKNOWN_EXTENDED_KEY_USAGES_FIELD_NUMBER; + hash = (53 * hash) + getUnknownExtendedKeyUsagesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.security.privateca.v1beta1.KeyUsage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [KeyUsage][google.cloud.security.privateca.v1beta1.KeyUsage] describes key usage values that may appear in an X.509
+   * certificate.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.KeyUsage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.KeyUsage) + com.google.cloud.security.privateca.v1beta1.KeyUsageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.KeyUsage.class, + com.google.cloud.security.privateca.v1beta1.KeyUsage.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.KeyUsage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUnknownExtendedKeyUsagesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (baseKeyUsageBuilder_ == null) { + baseKeyUsage_ = null; + } else { + baseKeyUsage_ = null; + baseKeyUsageBuilder_ = null; + } + if (extendedKeyUsageBuilder_ == null) { + extendedKeyUsage_ = null; + } else { + extendedKeyUsage_ = null; + extendedKeyUsageBuilder_ = null; + } + if (unknownExtendedKeyUsagesBuilder_ == null) { + unknownExtendedKeyUsages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + unknownExtendedKeyUsagesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.KeyUsage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage build() { + com.google.cloud.security.privateca.v1beta1.KeyUsage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage buildPartial() { + com.google.cloud.security.privateca.v1beta1.KeyUsage result = + new com.google.cloud.security.privateca.v1beta1.KeyUsage(this); + int from_bitField0_ = bitField0_; + if (baseKeyUsageBuilder_ == null) { + result.baseKeyUsage_ = baseKeyUsage_; + } else { + result.baseKeyUsage_ = baseKeyUsageBuilder_.build(); + } + if (extendedKeyUsageBuilder_ == null) { + result.extendedKeyUsage_ = extendedKeyUsage_; + } else { + result.extendedKeyUsage_ = extendedKeyUsageBuilder_.build(); + } + if (unknownExtendedKeyUsagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + unknownExtendedKeyUsages_ = + java.util.Collections.unmodifiableList(unknownExtendedKeyUsages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.unknownExtendedKeyUsages_ = unknownExtendedKeyUsages_; + } else { + result.unknownExtendedKeyUsages_ = unknownExtendedKeyUsagesBuilder_.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.security.privateca.v1beta1.KeyUsage) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.KeyUsage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.security.privateca.v1beta1.KeyUsage other) { + if (other == com.google.cloud.security.privateca.v1beta1.KeyUsage.getDefaultInstance()) + return this; + if (other.hasBaseKeyUsage()) { + mergeBaseKeyUsage(other.getBaseKeyUsage()); + } + if (other.hasExtendedKeyUsage()) { + mergeExtendedKeyUsage(other.getExtendedKeyUsage()); + } + if (unknownExtendedKeyUsagesBuilder_ == null) { + if (!other.unknownExtendedKeyUsages_.isEmpty()) { + if (unknownExtendedKeyUsages_.isEmpty()) { + unknownExtendedKeyUsages_ = other.unknownExtendedKeyUsages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUnknownExtendedKeyUsagesIsMutable(); + unknownExtendedKeyUsages_.addAll(other.unknownExtendedKeyUsages_); + } + onChanged(); + } + } else { + if (!other.unknownExtendedKeyUsages_.isEmpty()) { + if (unknownExtendedKeyUsagesBuilder_.isEmpty()) { + unknownExtendedKeyUsagesBuilder_.dispose(); + unknownExtendedKeyUsagesBuilder_ = null; + unknownExtendedKeyUsages_ = other.unknownExtendedKeyUsages_; + bitField0_ = (bitField0_ & ~0x00000001); + unknownExtendedKeyUsagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUnknownExtendedKeyUsagesFieldBuilder() + : null; + } else { + unknownExtendedKeyUsagesBuilder_.addAllMessages(other.unknownExtendedKeyUsages_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.KeyUsage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.KeyUsage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions baseKeyUsage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions, + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.Builder, + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptionsOrBuilder> + baseKeyUsageBuilder_; + /** + * + * + *
+     * Describes high-level ways in which a key may be used.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + * + * @return Whether the baseKeyUsage field is set. + */ + public boolean hasBaseKeyUsage() { + return baseKeyUsageBuilder_ != null || baseKeyUsage_ != null; + } + /** + * + * + *
+     * Describes high-level ways in which a key may be used.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + * + * @return The baseKeyUsage. + */ + public com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions getBaseKeyUsage() { + if (baseKeyUsageBuilder_ == null) { + return baseKeyUsage_ == null + ? com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + .getDefaultInstance() + : baseKeyUsage_; + } else { + return baseKeyUsageBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Describes high-level ways in which a key may be used.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + */ + public Builder setBaseKeyUsage( + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions value) { + if (baseKeyUsageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + baseKeyUsage_ = value; + onChanged(); + } else { + baseKeyUsageBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Describes high-level ways in which a key may be used.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + */ + public Builder setBaseKeyUsage( + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.Builder + builderForValue) { + if (baseKeyUsageBuilder_ == null) { + baseKeyUsage_ = builderForValue.build(); + onChanged(); + } else { + baseKeyUsageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Describes high-level ways in which a key may be used.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + */ + public Builder mergeBaseKeyUsage( + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions value) { + if (baseKeyUsageBuilder_ == null) { + if (baseKeyUsage_ != null) { + baseKeyUsage_ = + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.newBuilder( + baseKeyUsage_) + .mergeFrom(value) + .buildPartial(); + } else { + baseKeyUsage_ = value; + } + onChanged(); + } else { + baseKeyUsageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Describes high-level ways in which a key may be used.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + */ + public Builder clearBaseKeyUsage() { + if (baseKeyUsageBuilder_ == null) { + baseKeyUsage_ = null; + onChanged(); + } else { + baseKeyUsage_ = null; + baseKeyUsageBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Describes high-level ways in which a key may be used.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.Builder + getBaseKeyUsageBuilder() { + + onChanged(); + return getBaseKeyUsageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Describes high-level ways in which a key may be used.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptionsOrBuilder + getBaseKeyUsageOrBuilder() { + if (baseKeyUsageBuilder_ != null) { + return baseKeyUsageBuilder_.getMessageOrBuilder(); + } else { + return baseKeyUsage_ == null + ? com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + .getDefaultInstance() + : baseKeyUsage_; + } + } + /** + * + * + *
+     * Describes high-level ways in which a key may be used.
+     * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions, + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.Builder, + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptionsOrBuilder> + getBaseKeyUsageFieldBuilder() { + if (baseKeyUsageBuilder_ == null) { + baseKeyUsageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions, + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.Builder, + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptionsOrBuilder>( + getBaseKeyUsage(), getParentForChildren(), isClean()); + baseKeyUsage_ = null; + } + return baseKeyUsageBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + extendedKeyUsage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions, + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.Builder, + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptionsOrBuilder> + extendedKeyUsageBuilder_; + /** + * + * + *
+     * Detailed scenarios in which a key may be used.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + * + * @return Whether the extendedKeyUsage field is set. + */ + public boolean hasExtendedKeyUsage() { + return extendedKeyUsageBuilder_ != null || extendedKeyUsage_ != null; + } + /** + * + * + *
+     * Detailed scenarios in which a key may be used.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + * + * @return The extendedKeyUsage. + */ + public com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + getExtendedKeyUsage() { + if (extendedKeyUsageBuilder_ == null) { + return extendedKeyUsage_ == null + ? com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + .getDefaultInstance() + : extendedKeyUsage_; + } else { + return extendedKeyUsageBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Detailed scenarios in which a key may be used.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + */ + public Builder setExtendedKeyUsage( + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions value) { + if (extendedKeyUsageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + extendedKeyUsage_ = value; + onChanged(); + } else { + extendedKeyUsageBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Detailed scenarios in which a key may be used.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + */ + public Builder setExtendedKeyUsage( + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.Builder + builderForValue) { + if (extendedKeyUsageBuilder_ == null) { + extendedKeyUsage_ = builderForValue.build(); + onChanged(); + } else { + extendedKeyUsageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Detailed scenarios in which a key may be used.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + */ + public Builder mergeExtendedKeyUsage( + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions value) { + if (extendedKeyUsageBuilder_ == null) { + if (extendedKeyUsage_ != null) { + extendedKeyUsage_ = + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + .newBuilder(extendedKeyUsage_) + .mergeFrom(value) + .buildPartial(); + } else { + extendedKeyUsage_ = value; + } + onChanged(); + } else { + extendedKeyUsageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Detailed scenarios in which a key may be used.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + */ + public Builder clearExtendedKeyUsage() { + if (extendedKeyUsageBuilder_ == null) { + extendedKeyUsage_ = null; + onChanged(); + } else { + extendedKeyUsage_ = null; + extendedKeyUsageBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Detailed scenarios in which a key may be used.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + */ + public com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.Builder + getExtendedKeyUsageBuilder() { + + onChanged(); + return getExtendedKeyUsageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Detailed scenarios in which a key may be used.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + */ + public com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptionsOrBuilder + getExtendedKeyUsageOrBuilder() { + if (extendedKeyUsageBuilder_ != null) { + return extendedKeyUsageBuilder_.getMessageOrBuilder(); + } else { + return extendedKeyUsage_ == null + ? com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + .getDefaultInstance() + : extendedKeyUsage_; + } + } + /** + * + * + *
+     * Detailed scenarios in which a key may be used.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions, + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.Builder, + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptionsOrBuilder> + getExtendedKeyUsageFieldBuilder() { + if (extendedKeyUsageBuilder_ == null) { + extendedKeyUsageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions, + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + .Builder, + com.google.cloud.security.privateca.v1beta1.KeyUsage + .ExtendedKeyUsageOptionsOrBuilder>( + getExtendedKeyUsage(), getParentForChildren(), isClean()); + extendedKeyUsage_ = null; + } + return extendedKeyUsageBuilder_; + } + + private java.util.List + unknownExtendedKeyUsages_ = java.util.Collections.emptyList(); + + private void ensureUnknownExtendedKeyUsagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + unknownExtendedKeyUsages_ = + new java.util.ArrayList( + unknownExtendedKeyUsages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ObjectId, + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder, + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder> + unknownExtendedKeyUsagesBuilder_; + + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public java.util.List + getUnknownExtendedKeyUsagesList() { + if (unknownExtendedKeyUsagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(unknownExtendedKeyUsages_); + } else { + return unknownExtendedKeyUsagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public int getUnknownExtendedKeyUsagesCount() { + if (unknownExtendedKeyUsagesBuilder_ == null) { + return unknownExtendedKeyUsages_.size(); + } else { + return unknownExtendedKeyUsagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectId getUnknownExtendedKeyUsages( + int index) { + if (unknownExtendedKeyUsagesBuilder_ == null) { + return unknownExtendedKeyUsages_.get(index); + } else { + return unknownExtendedKeyUsagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public Builder setUnknownExtendedKeyUsages( + int index, com.google.cloud.security.privateca.v1beta1.ObjectId value) { + if (unknownExtendedKeyUsagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnknownExtendedKeyUsagesIsMutable(); + unknownExtendedKeyUsages_.set(index, value); + onChanged(); + } else { + unknownExtendedKeyUsagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public Builder setUnknownExtendedKeyUsages( + int index, com.google.cloud.security.privateca.v1beta1.ObjectId.Builder builderForValue) { + if (unknownExtendedKeyUsagesBuilder_ == null) { + ensureUnknownExtendedKeyUsagesIsMutable(); + unknownExtendedKeyUsages_.set(index, builderForValue.build()); + onChanged(); + } else { + unknownExtendedKeyUsagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public Builder addUnknownExtendedKeyUsages( + com.google.cloud.security.privateca.v1beta1.ObjectId value) { + if (unknownExtendedKeyUsagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnknownExtendedKeyUsagesIsMutable(); + unknownExtendedKeyUsages_.add(value); + onChanged(); + } else { + unknownExtendedKeyUsagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public Builder addUnknownExtendedKeyUsages( + int index, com.google.cloud.security.privateca.v1beta1.ObjectId value) { + if (unknownExtendedKeyUsagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnknownExtendedKeyUsagesIsMutable(); + unknownExtendedKeyUsages_.add(index, value); + onChanged(); + } else { + unknownExtendedKeyUsagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public Builder addUnknownExtendedKeyUsages( + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder builderForValue) { + if (unknownExtendedKeyUsagesBuilder_ == null) { + ensureUnknownExtendedKeyUsagesIsMutable(); + unknownExtendedKeyUsages_.add(builderForValue.build()); + onChanged(); + } else { + unknownExtendedKeyUsagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public Builder addUnknownExtendedKeyUsages( + int index, com.google.cloud.security.privateca.v1beta1.ObjectId.Builder builderForValue) { + if (unknownExtendedKeyUsagesBuilder_ == null) { + ensureUnknownExtendedKeyUsagesIsMutable(); + unknownExtendedKeyUsages_.add(index, builderForValue.build()); + onChanged(); + } else { + unknownExtendedKeyUsagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public Builder addAllUnknownExtendedKeyUsages( + java.lang.Iterable values) { + if (unknownExtendedKeyUsagesBuilder_ == null) { + ensureUnknownExtendedKeyUsagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unknownExtendedKeyUsages_); + onChanged(); + } else { + unknownExtendedKeyUsagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public Builder clearUnknownExtendedKeyUsages() { + if (unknownExtendedKeyUsagesBuilder_ == null) { + unknownExtendedKeyUsages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + unknownExtendedKeyUsagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public Builder removeUnknownExtendedKeyUsages(int index) { + if (unknownExtendedKeyUsagesBuilder_ == null) { + ensureUnknownExtendedKeyUsagesIsMutable(); + unknownExtendedKeyUsages_.remove(index); + onChanged(); + } else { + unknownExtendedKeyUsagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectId.Builder + getUnknownExtendedKeyUsagesBuilder(int index) { + return getUnknownExtendedKeyUsagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder + getUnknownExtendedKeyUsagesOrBuilder(int index) { + if (unknownExtendedKeyUsagesBuilder_ == null) { + return unknownExtendedKeyUsages_.get(index); + } else { + return unknownExtendedKeyUsagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public java.util.List + getUnknownExtendedKeyUsagesOrBuilderList() { + if (unknownExtendedKeyUsagesBuilder_ != null) { + return unknownExtendedKeyUsagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(unknownExtendedKeyUsages_); + } + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectId.Builder + addUnknownExtendedKeyUsagesBuilder() { + return getUnknownExtendedKeyUsagesFieldBuilder() + .addBuilder(com.google.cloud.security.privateca.v1beta1.ObjectId.getDefaultInstance()); + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectId.Builder + addUnknownExtendedKeyUsagesBuilder(int index) { + return getUnknownExtendedKeyUsagesFieldBuilder() + .addBuilder( + index, com.google.cloud.security.privateca.v1beta1.ObjectId.getDefaultInstance()); + } + /** + * + * + *
+     * Used to describe extended key usages that are not listed in the
+     * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + public java.util.List + getUnknownExtendedKeyUsagesBuilderList() { + return getUnknownExtendedKeyUsagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ObjectId, + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder, + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder> + getUnknownExtendedKeyUsagesFieldBuilder() { + if (unknownExtendedKeyUsagesBuilder_ == null) { + unknownExtendedKeyUsagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ObjectId, + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder, + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder>( + unknownExtendedKeyUsages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + unknownExtendedKeyUsages_ = null; + } + return unknownExtendedKeyUsagesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.KeyUsage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.KeyUsage) + private static final com.google.cloud.security.privateca.v1beta1.KeyUsage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.KeyUsage(); + } + + public static com.google.cloud.security.privateca.v1beta1.KeyUsage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeyUsage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KeyUsage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/KeyUsageOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/KeyUsageOrBuilder.java new file mode 100644 index 00000000..c020d95f --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/KeyUsageOrBuilder.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/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface KeyUsageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.KeyUsage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Describes high-level ways in which a key may be used.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + * + * @return Whether the baseKeyUsage field is set. + */ + boolean hasBaseKeyUsage(); + /** + * + * + *
+   * Describes high-level ways in which a key may be used.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + * + * @return The baseKeyUsage. + */ + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions getBaseKeyUsage(); + /** + * + * + *
+   * Describes high-level ways in which a key may be used.
+   * 
+ * + * .google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions base_key_usage = 1; + * + */ + com.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptionsOrBuilder + getBaseKeyUsageOrBuilder(); + + /** + * + * + *
+   * Detailed scenarios in which a key may be used.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + * + * @return Whether the extendedKeyUsage field is set. + */ + boolean hasExtendedKeyUsage(); + /** + * + * + *
+   * Detailed scenarios in which a key may be used.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + * + * @return The extendedKeyUsage. + */ + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + getExtendedKeyUsage(); + /** + * + * + *
+   * Detailed scenarios in which a key may be used.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions extended_key_usage = 2; + * + */ + com.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptionsOrBuilder + getExtendedKeyUsageOrBuilder(); + + /** + * + * + *
+   * Used to describe extended key usages that are not listed in the
+   * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + java.util.List + getUnknownExtendedKeyUsagesList(); + /** + * + * + *
+   * Used to describe extended key usages that are not listed in the
+   * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + com.google.cloud.security.privateca.v1beta1.ObjectId getUnknownExtendedKeyUsages(int index); + /** + * + * + *
+   * Used to describe extended key usages that are not listed in the
+   * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + int getUnknownExtendedKeyUsagesCount(); + /** + * + * + *
+   * Used to describe extended key usages that are not listed in the
+   * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + java.util.List + getUnknownExtendedKeyUsagesOrBuilderList(); + /** + * + * + *
+   * Used to describe extended key usages that are not listed in the
+   * [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId unknown_extended_key_usages = 3; + * + */ + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder + getUnknownExtendedKeyUsagesOrBuilder(int index); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesRequest.java new file mode 100644 index 00000000..d7006f24 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesRequest.java @@ -0,0 +1,1347 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest} + */ +public final class ListCertificateAuthoritiesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest) + ListCertificateAuthoritiesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificateAuthoritiesRequest.newBuilder() to construct. + private ListCertificateAuthoritiesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificateAuthoritiesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCertificateAuthoritiesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificateAuthoritiesRequest( + 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(); + + orderBy_ = 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest.class, + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+   * include in the response.
+   * Further [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] can subsequently be
+   * obtained by including the
+   * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent
+   * request. If unspecified, the server will pick an appropriate default.
+   * 
+ * + * 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. Pagination token, returned earlier via
+   * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * 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. Only include resources that match the filter in the response.
+   * 
+ * + * 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 ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!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 (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + 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 (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest other = + (com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.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) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest) + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest.class, + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest build() { + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest result = + new com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the location associated with the
+     * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+     * include in the response.
+     * Further [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] can subsequently be
+     * obtained by including the
+     * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent
+     * request. If unspecified, the server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+     * include in the response.
+     * Further [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] can subsequently be
+     * obtained by including the
+     * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent
+     * request. If unspecified, the server will pick an appropriate default.
+     * 
+ * + * 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. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+     * include in the response.
+     * Further [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] can subsequently be
+     * obtained by including the
+     * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent
+     * request. If unspecified, the server will pick an appropriate default.
+     * 
+ * + * 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. Pagination token, returned earlier via
+     * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only include resources that match the filter in the response.
+     * 
+ * + * 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 orderBy_ = ""; + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest) + private static final com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificateAuthoritiesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificateAuthoritiesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesRequestOrBuilder.java new file mode 100644 index 00000000..bb2a7dc3 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ListCertificateAuthoritiesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
+   * include in the response.
+   * Further [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] can subsequently be
+   * obtained by including the
+   * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent
+   * request. If unspecified, the server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesResponse.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesResponse.java new file mode 100644 index 00000000..83ed9878 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesResponse.java @@ -0,0 +1,1533 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse} + */ +public final class ListCertificateAuthoritiesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) + ListCertificateAuthoritiesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificateAuthoritiesResponse.newBuilder() to construct. + private ListCertificateAuthoritiesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificateAuthoritiesResponse() { + certificateAuthorities_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCertificateAuthoritiesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificateAuthoritiesResponse( + 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)) { + certificateAuthorities_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority>(); + mutable_bitField0_ |= 0x00000001; + } + certificateAuthorities_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + certificateAuthorities_ = java.util.Collections.unmodifiableList(certificateAuthorities_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.class, + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.Builder + .class); + } + + public static final int CERTIFICATE_AUTHORITIES_FIELD_NUMBER = 1; + private java.util.List + certificateAuthorities_; + /** + * + * + *
+   * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + @java.lang.Override + public java.util.List + getCertificateAuthoritiesList() { + return certificateAuthorities_; + } + /** + * + * + *
+   * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder> + getCertificateAuthoritiesOrBuilderList() { + return certificateAuthorities_; + } + /** + * + * + *
+   * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + @java.lang.Override + public int getCertificateAuthoritiesCount() { + return certificateAuthorities_.size(); + } + /** + * + * + *
+   * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority getCertificateAuthorities( + int index) { + return certificateAuthorities_.get(index); + } + /** + * + * + *
+   * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder + getCertificateAuthoritiesOrBuilder(int index) { + return certificateAuthorities_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListCertificateAuthoritiesRequest.next_page_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 next page of results. Pass this value in
+   * [ListCertificateAuthoritiesRequest.next_page_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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < certificateAuthorities_.size(); i++) { + output.writeMessage(1, certificateAuthorities_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < certificateAuthorities_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, certificateAuthorities_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse other = + (com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) obj; + + if (!getCertificateAuthoritiesList().equals(other.getCertificateAuthoritiesList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.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 (getCertificateAuthoritiesCount() > 0) { + hash = (37 * hash) + CERTIFICATE_AUTHORITIES_FIELD_NUMBER; + hash = (53 * hash) + getCertificateAuthoritiesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.class, + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCertificateAuthoritiesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (certificateAuthoritiesBuilder_ == null) { + certificateAuthorities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + certificateAuthoritiesBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse build() { + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + buildPartial() { + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse result = + new com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse(this); + int from_bitField0_ = bitField0_; + if (certificateAuthoritiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + certificateAuthorities_ = java.util.Collections.unmodifiableList(certificateAuthorities_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.certificateAuthorities_ = certificateAuthorities_; + } else { + result.certificateAuthorities_ = certificateAuthoritiesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + .getDefaultInstance()) return this; + if (certificateAuthoritiesBuilder_ == null) { + if (!other.certificateAuthorities_.isEmpty()) { + if (certificateAuthorities_.isEmpty()) { + certificateAuthorities_ = other.certificateAuthorities_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCertificateAuthoritiesIsMutable(); + certificateAuthorities_.addAll(other.certificateAuthorities_); + } + onChanged(); + } + } else { + if (!other.certificateAuthorities_.isEmpty()) { + if (certificateAuthoritiesBuilder_.isEmpty()) { + certificateAuthoritiesBuilder_.dispose(); + certificateAuthoritiesBuilder_ = null; + certificateAuthorities_ = other.certificateAuthorities_; + bitField0_ = (bitField0_ & ~0x00000001); + certificateAuthoritiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCertificateAuthoritiesFieldBuilder() + : null; + } else { + certificateAuthoritiesBuilder_.addAllMessages(other.certificateAuthorities_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + certificateAuthorities_ = java.util.Collections.emptyList(); + + private void ensureCertificateAuthoritiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + certificateAuthorities_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority>( + certificateAuthorities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder> + certificateAuthoritiesBuilder_; + + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public java.util.List + getCertificateAuthoritiesList() { + if (certificateAuthoritiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(certificateAuthorities_); + } else { + return certificateAuthoritiesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public int getCertificateAuthoritiesCount() { + if (certificateAuthoritiesBuilder_ == null) { + return certificateAuthorities_.size(); + } else { + return certificateAuthoritiesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + getCertificateAuthorities(int index) { + if (certificateAuthoritiesBuilder_ == null) { + return certificateAuthorities_.get(index); + } else { + return certificateAuthoritiesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public Builder setCertificateAuthorities( + int index, com.google.cloud.security.privateca.v1beta1.CertificateAuthority value) { + if (certificateAuthoritiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateAuthoritiesIsMutable(); + certificateAuthorities_.set(index, value); + onChanged(); + } else { + certificateAuthoritiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public Builder setCertificateAuthorities( + int index, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder builderForValue) { + if (certificateAuthoritiesBuilder_ == null) { + ensureCertificateAuthoritiesIsMutable(); + certificateAuthorities_.set(index, builderForValue.build()); + onChanged(); + } else { + certificateAuthoritiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public Builder addCertificateAuthorities( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority value) { + if (certificateAuthoritiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateAuthoritiesIsMutable(); + certificateAuthorities_.add(value); + onChanged(); + } else { + certificateAuthoritiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public Builder addCertificateAuthorities( + int index, com.google.cloud.security.privateca.v1beta1.CertificateAuthority value) { + if (certificateAuthoritiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateAuthoritiesIsMutable(); + certificateAuthorities_.add(index, value); + onChanged(); + } else { + certificateAuthoritiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public Builder addCertificateAuthorities( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder builderForValue) { + if (certificateAuthoritiesBuilder_ == null) { + ensureCertificateAuthoritiesIsMutable(); + certificateAuthorities_.add(builderForValue.build()); + onChanged(); + } else { + certificateAuthoritiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public Builder addCertificateAuthorities( + int index, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder builderForValue) { + if (certificateAuthoritiesBuilder_ == null) { + ensureCertificateAuthoritiesIsMutable(); + certificateAuthorities_.add(index, builderForValue.build()); + onChanged(); + } else { + certificateAuthoritiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public Builder addAllCertificateAuthorities( + java.lang.Iterable< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateAuthority> + values) { + if (certificateAuthoritiesBuilder_ == null) { + ensureCertificateAuthoritiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, certificateAuthorities_); + onChanged(); + } else { + certificateAuthoritiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public Builder clearCertificateAuthorities() { + if (certificateAuthoritiesBuilder_ == null) { + certificateAuthorities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + certificateAuthoritiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public Builder removeCertificateAuthorities(int index) { + if (certificateAuthoritiesBuilder_ == null) { + ensureCertificateAuthoritiesIsMutable(); + certificateAuthorities_.remove(index); + onChanged(); + } else { + certificateAuthoritiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder + getCertificateAuthoritiesBuilder(int index) { + return getCertificateAuthoritiesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder + getCertificateAuthoritiesOrBuilder(int index) { + if (certificateAuthoritiesBuilder_ == null) { + return certificateAuthorities_.get(index); + } else { + return certificateAuthoritiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder> + getCertificateAuthoritiesOrBuilderList() { + if (certificateAuthoritiesBuilder_ != null) { + return certificateAuthoritiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(certificateAuthorities_); + } + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder + addCertificateAuthoritiesBuilder() { + return getCertificateAuthoritiesFieldBuilder() + .addBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder + addCertificateAuthoritiesBuilder(int index) { + return getCertificateAuthoritiesFieldBuilder() + .addBuilder( + index, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + public java.util.List + getCertificateAuthoritiesBuilderList() { + return getCertificateAuthoritiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder> + getCertificateAuthoritiesFieldBuilder() { + if (certificateAuthoritiesBuilder_ == null) { + certificateAuthoritiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder>( + certificateAuthorities_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + certificateAuthorities_ = null; + } + return certificateAuthoritiesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results. Pass this value in
+     * [ListCertificateAuthoritiesRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificateAuthoritiesRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificateAuthoritiesRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificateAuthoritiesRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificateAuthoritiesRequest.next_page_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; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) + private static final com.google.cloud.security.privateca.v1beta1 + .ListCertificateAuthoritiesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse(); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificateAuthoritiesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificateAuthoritiesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesResponseOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesResponseOrBuilder.java new file mode 100644 index 00000000..21eb6564 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateAuthoritiesResponseOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ListCertificateAuthoritiesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + java.util.List + getCertificateAuthoritiesList(); + /** + * + * + *
+   * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority getCertificateAuthorities( + int index); + /** + * + * + *
+   * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + int getCertificateAuthoritiesCount(); + /** + * + * + *
+   * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder> + getCertificateAuthoritiesOrBuilderList(); + /** + * + * + *
+   * The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authorities = 1; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder + getCertificateAuthoritiesOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListCertificateAuthoritiesRequest.next_page_token][] to retrieve the next
+   * page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListCertificateAuthoritiesRequest.next_page_token][] to retrieve the next
+   * page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsRequest.java new file mode 100644 index 00000000..a0e7de07 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsRequest.java @@ -0,0 +1,1356 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists].
+ * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest} + */ +public final class ListCertificateRevocationListsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest) + ListCertificateRevocationListsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificateRevocationListsRequest.newBuilder() to construct. + private ListCertificateRevocationListsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificateRevocationListsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCertificateRevocationListsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificateRevocationListsRequest( + 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(); + + orderBy_ = 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest.class, + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + .Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+   * `projects/*/locations/*/certificateauthorities/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+   * `projects/*/locations/*/certificateauthorities/*`.
+   * 
+ * + * + * 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. Limit on the number of
+   * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to include in the
+   * response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
+   * can subsequently be obtained by including the
+   * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent
+   * request. If unspecified, the server will pick an appropriate default.
+   * 
+ * + * 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. Pagination token, returned earlier via
+   * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * 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. Only include resources that match the filter in the response.
+   * 
+ * + * 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 ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!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 (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + 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 (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest other = + (com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.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) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest) + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + .class, + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + build() { + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest result = + new com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest( + this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the location associated with the
+     * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+     * `projects/*/locations/*/certificateauthorities/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+     * `projects/*/locations/*/certificateauthorities/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+     * `projects/*/locations/*/certificateauthorities/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+     * `projects/*/locations/*/certificateauthorities/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+     * `projects/*/locations/*/certificateauthorities/*`.
+     * 
+ * + * + * 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. Limit on the number of
+     * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to include in the
+     * response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
+     * can subsequently be obtained by including the
+     * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent
+     * request. If unspecified, the server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Limit on the number of
+     * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to include in the
+     * response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
+     * can subsequently be obtained by including the
+     * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent
+     * request. If unspecified, the server will pick an appropriate default.
+     * 
+ * + * 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. Limit on the number of
+     * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to include in the
+     * response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
+     * can subsequently be obtained by including the
+     * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent
+     * request. If unspecified, the server will pick an appropriate default.
+     * 
+ * + * 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. Pagination token, returned earlier via
+     * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only include resources that match the filter in the response.
+     * 
+ * + * 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 orderBy_ = ""; + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest) + private static final com.google.cloud.security.privateca.v1beta1 + .ListCertificateRevocationListsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificateRevocationListsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificateRevocationListsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsRequestOrBuilder.java new file mode 100644 index 00000000..a378a19e --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ListCertificateRevocationListsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+   * `projects/*/locations/*/certificateauthorities/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
+   * `projects/*/locations/*/certificateauthorities/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Limit on the number of
+   * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to include in the
+   * response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
+   * can subsequently be obtained by including the
+   * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent
+   * request. If unspecified, the server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsResponse.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsResponse.java new file mode 100644 index 00000000..48bd950d --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsResponse.java @@ -0,0 +1,1549 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists].
+ * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse} + */ +public final class ListCertificateRevocationListsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) + ListCertificateRevocationListsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificateRevocationListsResponse.newBuilder() to construct. + private ListCertificateRevocationListsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificateRevocationListsResponse() { + certificateRevocationLists_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCertificateRevocationListsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificateRevocationListsResponse( + 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)) { + certificateRevocationLists_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList>(); + mutable_bitField0_ |= 0x00000001; + } + certificateRevocationLists_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + certificateRevocationLists_ = + java.util.Collections.unmodifiableList(certificateRevocationLists_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + .class, + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + .Builder.class); + } + + public static final int CERTIFICATE_REVOCATION_LISTS_FIELD_NUMBER = 1; + private java.util.List + certificateRevocationLists_; + /** + * + * + *
+   * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + @java.lang.Override + public java.util.List + getCertificateRevocationListsList() { + return certificateRevocationLists_; + } + /** + * + * + *
+   * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder> + getCertificateRevocationListsOrBuilderList() { + return certificateRevocationLists_; + } + /** + * + * + *
+   * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + @java.lang.Override + public int getCertificateRevocationListsCount() { + return certificateRevocationLists_.size(); + } + /** + * + * + *
+   * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getCertificateRevocationLists(int index) { + return certificateRevocationLists_.get(index); + } + /** + * + * + *
+   * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder + getCertificateRevocationListsOrBuilder(int index) { + return certificateRevocationLists_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListCertificateRevocationListsRequest.next_page_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 next page of results. Pass this value in
+   * [ListCertificateRevocationListsRequest.next_page_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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < certificateRevocationLists_.size(); i++) { + output.writeMessage(1, certificateRevocationLists_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < certificateRevocationLists_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, certificateRevocationLists_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse other = + (com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) obj; + + if (!getCertificateRevocationListsList().equals(other.getCertificateRevocationListsList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.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 (getCertificateRevocationListsCount() > 0) { + hash = (37 * hash) + CERTIFICATE_REVOCATION_LISTS_FIELD_NUMBER; + hash = (53 * hash) + getCertificateRevocationListsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + .class, + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCertificateRevocationListsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (certificateRevocationListsBuilder_ == null) { + certificateRevocationLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + certificateRevocationListsBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + build() { + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + buildPartial() { + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse result = + new com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse( + this); + int from_bitField0_ = bitField0_; + if (certificateRevocationListsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + certificateRevocationLists_ = + java.util.Collections.unmodifiableList(certificateRevocationLists_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.certificateRevocationLists_ = certificateRevocationLists_; + } else { + result.certificateRevocationLists_ = certificateRevocationListsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + .getDefaultInstance()) return this; + if (certificateRevocationListsBuilder_ == null) { + if (!other.certificateRevocationLists_.isEmpty()) { + if (certificateRevocationLists_.isEmpty()) { + certificateRevocationLists_ = other.certificateRevocationLists_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCertificateRevocationListsIsMutable(); + certificateRevocationLists_.addAll(other.certificateRevocationLists_); + } + onChanged(); + } + } else { + if (!other.certificateRevocationLists_.isEmpty()) { + if (certificateRevocationListsBuilder_.isEmpty()) { + certificateRevocationListsBuilder_.dispose(); + certificateRevocationListsBuilder_ = null; + certificateRevocationLists_ = other.certificateRevocationLists_; + bitField0_ = (bitField0_ & ~0x00000001); + certificateRevocationListsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCertificateRevocationListsFieldBuilder() + : null; + } else { + certificateRevocationListsBuilder_.addAllMessages(other.certificateRevocationLists_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + certificateRevocationLists_ = java.util.Collections.emptyList(); + + private void ensureCertificateRevocationListsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + certificateRevocationLists_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList>( + certificateRevocationLists_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder> + certificateRevocationListsBuilder_; + + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public java.util.List + getCertificateRevocationListsList() { + if (certificateRevocationListsBuilder_ == null) { + return java.util.Collections.unmodifiableList(certificateRevocationLists_); + } else { + return certificateRevocationListsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public int getCertificateRevocationListsCount() { + if (certificateRevocationListsBuilder_ == null) { + return certificateRevocationLists_.size(); + } else { + return certificateRevocationListsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getCertificateRevocationLists(int index) { + if (certificateRevocationListsBuilder_ == null) { + return certificateRevocationLists_.get(index); + } else { + return certificateRevocationListsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public Builder setCertificateRevocationLists( + int index, com.google.cloud.security.privateca.v1beta1.CertificateRevocationList value) { + if (certificateRevocationListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateRevocationListsIsMutable(); + certificateRevocationLists_.set(index, value); + onChanged(); + } else { + certificateRevocationListsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public Builder setCertificateRevocationLists( + int index, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder + builderForValue) { + if (certificateRevocationListsBuilder_ == null) { + ensureCertificateRevocationListsIsMutable(); + certificateRevocationLists_.set(index, builderForValue.build()); + onChanged(); + } else { + certificateRevocationListsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public Builder addCertificateRevocationLists( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList value) { + if (certificateRevocationListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateRevocationListsIsMutable(); + certificateRevocationLists_.add(value); + onChanged(); + } else { + certificateRevocationListsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public Builder addCertificateRevocationLists( + int index, com.google.cloud.security.privateca.v1beta1.CertificateRevocationList value) { + if (certificateRevocationListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateRevocationListsIsMutable(); + certificateRevocationLists_.add(index, value); + onChanged(); + } else { + certificateRevocationListsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public Builder addCertificateRevocationLists( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder + builderForValue) { + if (certificateRevocationListsBuilder_ == null) { + ensureCertificateRevocationListsIsMutable(); + certificateRevocationLists_.add(builderForValue.build()); + onChanged(); + } else { + certificateRevocationListsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public Builder addCertificateRevocationLists( + int index, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder + builderForValue) { + if (certificateRevocationListsBuilder_ == null) { + ensureCertificateRevocationListsIsMutable(); + certificateRevocationLists_.add(index, builderForValue.build()); + onChanged(); + } else { + certificateRevocationListsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public Builder addAllCertificateRevocationLists( + java.lang.Iterable< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateRevocationList> + values) { + if (certificateRevocationListsBuilder_ == null) { + ensureCertificateRevocationListsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, certificateRevocationLists_); + onChanged(); + } else { + certificateRevocationListsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public Builder clearCertificateRevocationLists() { + if (certificateRevocationListsBuilder_ == null) { + certificateRevocationLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + certificateRevocationListsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public Builder removeCertificateRevocationLists(int index) { + if (certificateRevocationListsBuilder_ == null) { + ensureCertificateRevocationListsIsMutable(); + certificateRevocationLists_.remove(index); + onChanged(); + } else { + certificateRevocationListsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder + getCertificateRevocationListsBuilder(int index) { + return getCertificateRevocationListsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder + getCertificateRevocationListsOrBuilder(int index) { + if (certificateRevocationListsBuilder_ == null) { + return certificateRevocationLists_.get(index); + } else { + return certificateRevocationListsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder> + getCertificateRevocationListsOrBuilderList() { + if (certificateRevocationListsBuilder_ != null) { + return certificateRevocationListsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(certificateRevocationLists_); + } + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder + addCertificateRevocationListsBuilder() { + return getCertificateRevocationListsFieldBuilder() + .addBuilder( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder + addCertificateRevocationListsBuilder(int index) { + return getCertificateRevocationListsFieldBuilder() + .addBuilder( + index, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + public java.util.List< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder> + getCertificateRevocationListsBuilderList() { + return getCertificateRevocationListsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder> + getCertificateRevocationListsFieldBuilder() { + if (certificateRevocationListsBuilder_ == null) { + certificateRevocationListsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder>( + certificateRevocationLists_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + certificateRevocationLists_ = null; + } + return certificateRevocationListsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results. Pass this value in
+     * [ListCertificateRevocationListsRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificateRevocationListsRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificateRevocationListsRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificateRevocationListsRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificateRevocationListsRequest.next_page_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; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) + private static final com.google.cloud.security.privateca.v1beta1 + .ListCertificateRevocationListsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse(); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificateRevocationListsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificateRevocationListsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsResponseOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsResponseOrBuilder.java new file mode 100644 index 00000000..b9f5b669 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificateRevocationListsResponseOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ListCertificateRevocationListsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + java.util.List + getCertificateRevocationListsList(); + /** + * + * + *
+   * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getCertificateRevocationLists(int index); + /** + * + * + *
+   * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + int getCertificateRevocationListsCount(); + /** + * + * + *
+   * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder> + getCertificateRevocationListsOrBuilderList(); + /** + * + * + *
+   * The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_lists = 1; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder + getCertificateRevocationListsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListCertificateRevocationListsRequest.next_page_token][] to retrieve the
+   * next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListCertificateRevocationListsRequest.next_page_token][] to retrieve the
+   * next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesRequest.java new file mode 100644 index 00000000..f41cd4ce --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesRequest.java @@ -0,0 +1,1330 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ListCertificatesRequest} + */ +public final class ListCertificatesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ListCertificatesRequest) + ListCertificatesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificatesRequest.newBuilder() to construct. + private ListCertificatesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificatesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCertificatesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificatesRequest( + 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(); + + orderBy_ = 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest.class, + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
+   * `projects/*/locations/*/certificateauthorities/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
+   * `projects/*/locations/*/certificateauthorities/*`.
+   * 
+ * + * + * 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. Limit on the number of
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] to include in the
+   * response. Further [Certificates][google.cloud.security.privateca.v1beta1.Certificate] can subsequently be obtained
+   * by including the
+   * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token] in a subsequent
+   * request. If unspecified, the server will pick an appropriate default.
+   * 
+ * + * 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. Pagination token, returned earlier via
+   * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * 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. Only include resources that match the filter in the response.
+   * 
+ * + * 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 ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!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 (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + 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 (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest other = + (com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.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) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ListCertificatesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ListCertificatesRequest) + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest.class, + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest build() { + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest buildPartial() { + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest result = + new com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the location associated with the
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
+     * `projects/*/locations/*/certificateauthorities/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
+     * `projects/*/locations/*/certificateauthorities/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
+     * `projects/*/locations/*/certificateauthorities/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
+     * `projects/*/locations/*/certificateauthorities/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
+     * `projects/*/locations/*/certificateauthorities/*`.
+     * 
+ * + * + * 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. Limit on the number of
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] to include in the
+     * response. Further [Certificates][google.cloud.security.privateca.v1beta1.Certificate] can subsequently be obtained
+     * by including the
+     * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token] in a subsequent
+     * request. If unspecified, the server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Limit on the number of
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] to include in the
+     * response. Further [Certificates][google.cloud.security.privateca.v1beta1.Certificate] can subsequently be obtained
+     * by including the
+     * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token] in a subsequent
+     * request. If unspecified, the server will pick an appropriate default.
+     * 
+ * + * 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. Limit on the number of
+     * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] to include in the
+     * response. Further [Certificates][google.cloud.security.privateca.v1beta1.Certificate] can subsequently be obtained
+     * by including the
+     * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token] in a subsequent
+     * request. If unspecified, the server will pick an appropriate default.
+     * 
+ * + * 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. Pagination token, returned earlier via
+     * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only include resources that match the filter in the response.
+     * 
+ * + * 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 orderBy_ = ""; + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ListCertificatesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ListCertificatesRequest) + private static final com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificatesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificatesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificatesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesRequestOrBuilder.java new file mode 100644 index 00000000..ad15aa59 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ListCertificatesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ListCertificatesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
+   * `projects/*/locations/*/certificateauthorities/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
+   * `projects/*/locations/*/certificateauthorities/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Limit on the number of
+   * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] to include in the
+   * response. Further [Certificates][google.cloud.security.privateca.v1beta1.Certificate] can subsequently be obtained
+   * by including the
+   * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token] in a subsequent
+   * request. If unspecified, the server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesResponse.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesResponse.java new file mode 100644 index 00000000..ef2d48b0 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesResponse.java @@ -0,0 +1,1450 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Response message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ListCertificatesResponse} + */ +public final class ListCertificatesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ListCertificatesResponse) + ListCertificatesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificatesResponse.newBuilder() to construct. + private ListCertificatesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificatesResponse() { + certificates_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCertificatesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificatesResponse( + 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)) { + certificates_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.Certificate>(); + mutable_bitField0_ |= 0x00000001; + } + certificates_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.Certificate.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + certificates_ = java.util.Collections.unmodifiableList(certificates_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse.class, + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse.Builder.class); + } + + public static final int CERTIFICATES_FIELD_NUMBER = 1; + private java.util.List certificates_; + /** + * + * + *
+   * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + @java.lang.Override + public java.util.List + getCertificatesList() { + return certificates_; + } + /** + * + * + *
+   * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + @java.lang.Override + public java.util.List + getCertificatesOrBuilderList() { + return certificates_; + } + /** + * + * + *
+   * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + @java.lang.Override + public int getCertificatesCount() { + return certificates_.size(); + } + /** + * + * + *
+   * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate getCertificates(int index) { + return certificates_.get(index); + } + /** + * + * + *
+   * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder getCertificatesOrBuilder( + int index) { + return certificates_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListCertificatesRequest.next_page_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 next page of results. Pass this value in
+   * [ListCertificatesRequest.next_page_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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < certificates_.size(); i++) { + output.writeMessage(1, certificates_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < certificates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, certificates_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse other = + (com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse) obj; + + if (!getCertificatesList().equals(other.getCertificatesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.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 (getCertificatesCount() > 0) { + hash = (37 * hash) + CERTIFICATES_FIELD_NUMBER; + hash = (53 * hash) + getCertificatesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ListCertificatesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ListCertificatesResponse) + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse.class, + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCertificatesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (certificatesBuilder_ == null) { + certificates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + certificatesBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse build() { + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse buildPartial() { + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse result = + new com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse(this); + int from_bitField0_ = bitField0_; + if (certificatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + certificates_ = java.util.Collections.unmodifiableList(certificates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.certificates_ = certificates_; + } else { + result.certificates_ = certificatesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse + .getDefaultInstance()) return this; + if (certificatesBuilder_ == null) { + if (!other.certificates_.isEmpty()) { + if (certificates_.isEmpty()) { + certificates_ = other.certificates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCertificatesIsMutable(); + certificates_.addAll(other.certificates_); + } + onChanged(); + } + } else { + if (!other.certificates_.isEmpty()) { + if (certificatesBuilder_.isEmpty()) { + certificatesBuilder_.dispose(); + certificatesBuilder_ = null; + certificates_ = other.certificates_; + bitField0_ = (bitField0_ & ~0x00000001); + certificatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCertificatesFieldBuilder() + : null; + } else { + certificatesBuilder_.addAllMessages(other.certificates_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List certificates_ = + java.util.Collections.emptyList(); + + private void ensureCertificatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + certificates_ = + new java.util.ArrayList( + certificates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder> + certificatesBuilder_; + + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public java.util.List + getCertificatesList() { + if (certificatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(certificates_); + } else { + return certificatesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public int getCertificatesCount() { + if (certificatesBuilder_ == null) { + return certificates_.size(); + } else { + return certificatesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public com.google.cloud.security.privateca.v1beta1.Certificate getCertificates(int index) { + if (certificatesBuilder_ == null) { + return certificates_.get(index); + } else { + return certificatesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public Builder setCertificates( + int index, com.google.cloud.security.privateca.v1beta1.Certificate value) { + if (certificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.set(index, value); + onChanged(); + } else { + certificatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public Builder setCertificates( + int index, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder builderForValue) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.set(index, builderForValue.build()); + onChanged(); + } else { + certificatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public Builder addCertificates(com.google.cloud.security.privateca.v1beta1.Certificate value) { + if (certificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.add(value); + onChanged(); + } else { + certificatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public Builder addCertificates( + int index, com.google.cloud.security.privateca.v1beta1.Certificate value) { + if (certificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.add(index, value); + onChanged(); + } else { + certificatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public Builder addCertificates( + com.google.cloud.security.privateca.v1beta1.Certificate.Builder builderForValue) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.add(builderForValue.build()); + onChanged(); + } else { + certificatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public Builder addCertificates( + int index, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder builderForValue) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.add(index, builderForValue.build()); + onChanged(); + } else { + certificatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public Builder addAllCertificates( + java.lang.Iterable + values) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, certificates_); + onChanged(); + } else { + certificatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public Builder clearCertificates() { + if (certificatesBuilder_ == null) { + certificates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + certificatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public Builder removeCertificates(int index) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.remove(index); + onChanged(); + } else { + certificatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public com.google.cloud.security.privateca.v1beta1.Certificate.Builder getCertificatesBuilder( + int index) { + return getCertificatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder + getCertificatesOrBuilder(int index) { + if (certificatesBuilder_ == null) { + return certificates_.get(index); + } else { + return certificatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder> + getCertificatesOrBuilderList() { + if (certificatesBuilder_ != null) { + return certificatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(certificates_); + } + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public com.google.cloud.security.privateca.v1beta1.Certificate.Builder + addCertificatesBuilder() { + return getCertificatesFieldBuilder() + .addBuilder(com.google.cloud.security.privateca.v1beta1.Certificate.getDefaultInstance()); + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public com.google.cloud.security.privateca.v1beta1.Certificate.Builder addCertificatesBuilder( + int index) { + return getCertificatesFieldBuilder() + .addBuilder( + index, com.google.cloud.security.privateca.v1beta1.Certificate.getDefaultInstance()); + } + /** + * + * + *
+     * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + public java.util.List + getCertificatesBuilderList() { + return getCertificatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder> + getCertificatesFieldBuilder() { + if (certificatesBuilder_ == null) { + certificatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder>( + certificates_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + certificates_ = null; + } + return certificatesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results. Pass this value in
+     * [ListCertificatesRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificatesRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificatesRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificatesRequest.next_page_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 next page of results. Pass this value in
+     * [ListCertificatesRequest.next_page_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; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ListCertificatesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ListCertificatesResponse) + private static final com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse(); + } + + public static com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificatesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificatesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListCertificatesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesResponseOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesResponseOrBuilder.java new file mode 100644 index 00000000..e43dae2a --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListCertificatesResponseOrBuilder.java @@ -0,0 +1,158 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ListCertificatesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ListCertificatesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + java.util.List getCertificatesList(); + /** + * + * + *
+   * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + com.google.cloud.security.privateca.v1beta1.Certificate getCertificates(int index); + /** + * + * + *
+   * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + int getCertificatesCount(); + /** + * + * + *
+   * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + java.util.List + getCertificatesOrBuilderList(); + /** + * + * + *
+   * The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.Certificate certificates = 1; + */ + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder getCertificatesOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListCertificatesRequest.next_page_token][] to retrieve the
+   * next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListCertificatesRequest.next_page_token][] to retrieve the
+   * next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsRequest.java new file mode 100644 index 00000000..c4a8b412 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsRequest.java @@ -0,0 +1,1333 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.ListReusableConfigs][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest} + */ +public final class ListReusableConfigsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest) + ListReusableConfigsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListReusableConfigsRequest.newBuilder() to construct. + private ListReusableConfigsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListReusableConfigsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListReusableConfigsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListReusableConfigsRequest( + 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(); + + orderBy_ = 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest.class, + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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. Limit on the number of
+   * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] to include in the response.
+   * Further [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] can subsequently be
+   * obtained by including the
+   * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token] in a subsequent request. If
+   * unspecified, the server will pick an appropriate default.
+   * 
+ * + * 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. Pagination token, returned earlier via
+   * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * 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. Only include resources that match the filter in the response.
+   * 
+ * + * 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 ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!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 (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + 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 (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest other = + (com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.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) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.ListReusableConfigs][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest) + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest.class, + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest build() { + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest buildPartial() { + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest result = + new com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the location associated with the
+     * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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 location associated with the
+     * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * 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. Limit on the number of
+     * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] to include in the response.
+     * Further [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] can subsequently be
+     * obtained by including the
+     * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token] in a subsequent request. If
+     * unspecified, the server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Limit on the number of
+     * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] to include in the response.
+     * Further [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] can subsequently be
+     * obtained by including the
+     * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token] in a subsequent request. If
+     * unspecified, the server will pick an appropriate default.
+     * 
+ * + * 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. Limit on the number of
+     * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] to include in the response.
+     * Further [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] can subsequently be
+     * obtained by including the
+     * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token] in a subsequent request. If
+     * unspecified, the server will pick an appropriate default.
+     * 
+ * + * 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. Pagination token, returned earlier via
+     * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Pagination token, returned earlier via
+     * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token].
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * 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. Only include resources that match the filter in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only include resources that match the filter in the response.
+     * 
+ * + * 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 orderBy_ = ""; + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify how the results should be sorted.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest) + private static final com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReusableConfigsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListReusableConfigsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsRequestOrBuilder.java new file mode 100644 index 00000000..a2865dd6 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ListReusableConfigsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the location associated with the
+   * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * 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 location associated with the
+   * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Limit on the number of
+   * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] to include in the response.
+   * Further [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] can subsequently be
+   * obtained by including the
+   * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token] in a subsequent request. If
+   * unspecified, the server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. Pagination token, returned earlier via
+   * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token].
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Only include resources that match the filter in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Specify how the results should be sorted.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsResponse.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsResponse.java new file mode 100644 index 00000000..9b71ef88 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsResponse.java @@ -0,0 +1,1488 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [CertificateAuthorityService.ListReusableConfigs][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse} + */ +public final class ListReusableConfigsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) + ListReusableConfigsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListReusableConfigsResponse.newBuilder() to construct. + private ListReusableConfigsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListReusableConfigsResponse() { + reusableConfigs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListReusableConfigsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListReusableConfigsResponse( + 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)) { + reusableConfigs_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.ReusableConfig>(); + mutable_bitField0_ |= 0x00000001; + } + reusableConfigs_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ReusableConfig.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + reusableConfigs_ = java.util.Collections.unmodifiableList(reusableConfigs_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.class, + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.Builder.class); + } + + public static final int REUSABLE_CONFIGS_FIELD_NUMBER = 1; + private java.util.List + reusableConfigs_; + /** + * + * + *
+   * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + @java.lang.Override + public java.util.List + getReusableConfigsList() { + return reusableConfigs_; + } + /** + * + * + *
+   * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder> + getReusableConfigsOrBuilderList() { + return reusableConfigs_; + } + /** + * + * + *
+   * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + @java.lang.Override + public int getReusableConfigsCount() { + return reusableConfigs_.size(); + } + /** + * + * + *
+   * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfig getReusableConfigs(int index) { + return reusableConfigs_.get(index); + } + /** + * + * + *
+   * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder + getReusableConfigsOrBuilder(int index) { + return reusableConfigs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListReusableConfigsRequest.next_page_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 next page of results. Pass this value in
+   * [ListReusableConfigsRequest.next_page_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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < reusableConfigs_.size(); i++) { + output.writeMessage(1, reusableConfigs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < reusableConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, reusableConfigs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse other = + (com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) obj; + + if (!getReusableConfigsList().equals(other.getReusableConfigsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.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 (getReusableConfigsCount() > 0) { + hash = (37 * hash) + REUSABLE_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getReusableConfigsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.ListReusableConfigs][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.class, + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReusableConfigsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (reusableConfigsBuilder_ == null) { + reusableConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + reusableConfigsBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse build() { + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse buildPartial() { + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse result = + new com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse(this); + int from_bitField0_ = bitField0_; + if (reusableConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + reusableConfigs_ = java.util.Collections.unmodifiableList(reusableConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.reusableConfigs_ = reusableConfigs_; + } else { + result.reusableConfigs_ = reusableConfigsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + .getDefaultInstance()) return this; + if (reusableConfigsBuilder_ == null) { + if (!other.reusableConfigs_.isEmpty()) { + if (reusableConfigs_.isEmpty()) { + reusableConfigs_ = other.reusableConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReusableConfigsIsMutable(); + reusableConfigs_.addAll(other.reusableConfigs_); + } + onChanged(); + } + } else { + if (!other.reusableConfigs_.isEmpty()) { + if (reusableConfigsBuilder_.isEmpty()) { + reusableConfigsBuilder_.dispose(); + reusableConfigsBuilder_ = null; + reusableConfigs_ = other.reusableConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + reusableConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReusableConfigsFieldBuilder() + : null; + } else { + reusableConfigsBuilder_.addAllMessages(other.reusableConfigs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + reusableConfigs_ = java.util.Collections.emptyList(); + + private void ensureReusableConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + reusableConfigs_ = + new java.util.ArrayList( + reusableConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfig, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder> + reusableConfigsBuilder_; + + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public java.util.List + getReusableConfigsList() { + if (reusableConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(reusableConfigs_); + } else { + return reusableConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public int getReusableConfigsCount() { + if (reusableConfigsBuilder_ == null) { + return reusableConfigs_.size(); + } else { + return reusableConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfig getReusableConfigs( + int index) { + if (reusableConfigsBuilder_ == null) { + return reusableConfigs_.get(index); + } else { + return reusableConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public Builder setReusableConfigs( + int index, com.google.cloud.security.privateca.v1beta1.ReusableConfig value) { + if (reusableConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReusableConfigsIsMutable(); + reusableConfigs_.set(index, value); + onChanged(); + } else { + reusableConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public Builder setReusableConfigs( + int index, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder builderForValue) { + if (reusableConfigsBuilder_ == null) { + ensureReusableConfigsIsMutable(); + reusableConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + reusableConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public Builder addReusableConfigs( + com.google.cloud.security.privateca.v1beta1.ReusableConfig value) { + if (reusableConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReusableConfigsIsMutable(); + reusableConfigs_.add(value); + onChanged(); + } else { + reusableConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public Builder addReusableConfigs( + int index, com.google.cloud.security.privateca.v1beta1.ReusableConfig value) { + if (reusableConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReusableConfigsIsMutable(); + reusableConfigs_.add(index, value); + onChanged(); + } else { + reusableConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public Builder addReusableConfigs( + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder builderForValue) { + if (reusableConfigsBuilder_ == null) { + ensureReusableConfigsIsMutable(); + reusableConfigs_.add(builderForValue.build()); + onChanged(); + } else { + reusableConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public Builder addReusableConfigs( + int index, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder builderForValue) { + if (reusableConfigsBuilder_ == null) { + ensureReusableConfigsIsMutable(); + reusableConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + reusableConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public Builder addAllReusableConfigs( + java.lang.Iterable + values) { + if (reusableConfigsBuilder_ == null) { + ensureReusableConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reusableConfigs_); + onChanged(); + } else { + reusableConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public Builder clearReusableConfigs() { + if (reusableConfigsBuilder_ == null) { + reusableConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + reusableConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public Builder removeReusableConfigs(int index) { + if (reusableConfigsBuilder_ == null) { + ensureReusableConfigsIsMutable(); + reusableConfigs_.remove(index); + onChanged(); + } else { + reusableConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder + getReusableConfigsBuilder(int index) { + return getReusableConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder + getReusableConfigsOrBuilder(int index) { + if (reusableConfigsBuilder_ == null) { + return reusableConfigs_.get(index); + } else { + return reusableConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder> + getReusableConfigsOrBuilderList() { + if (reusableConfigsBuilder_ != null) { + return reusableConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(reusableConfigs_); + } + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder + addReusableConfigsBuilder() { + return getReusableConfigsFieldBuilder() + .addBuilder( + com.google.cloud.security.privateca.v1beta1.ReusableConfig.getDefaultInstance()); + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder + addReusableConfigsBuilder(int index) { + return getReusableConfigsFieldBuilder() + .addBuilder( + index, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.getDefaultInstance()); + } + /** + * + * + *
+     * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + public java.util.List + getReusableConfigsBuilderList() { + return getReusableConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfig, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder> + getReusableConfigsFieldBuilder() { + if (reusableConfigsBuilder_ == null) { + reusableConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfig, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder>( + reusableConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + reusableConfigs_ = null; + } + return reusableConfigsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results. Pass this value in
+     * [ListReusableConfigsRequest.next_page_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 next page of results. Pass this value in
+     * [ListReusableConfigsRequest.next_page_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 next page of results. Pass this value in
+     * [ListReusableConfigsRequest.next_page_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 next page of results. Pass this value in
+     * [ListReusableConfigsRequest.next_page_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 next page of results. Pass this value in
+     * [ListReusableConfigsRequest.next_page_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; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations (e.g. "us-west1") that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) + private static final com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse(); + } + + public static com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReusableConfigsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListReusableConfigsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsResponseOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsResponseOrBuilder.java new file mode 100644 index 00000000..db4abc61 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ListReusableConfigsResponseOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ListReusableConfigsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + java.util.List + getReusableConfigsList(); + /** + * + * + *
+   * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfig getReusableConfigs(int index); + /** + * + * + *
+   * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + int getReusableConfigsCount(); + /** + * + * + *
+   * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + java.util.List + getReusableConfigsOrBuilderList(); + /** + * + * + *
+   * The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_configs = 1; + * + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder getReusableConfigsOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListReusableConfigsRequest.next_page_token][] to retrieve
+   * the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results. Pass this value in
+   * [ListReusableConfigsRequest.next_page_token][] to retrieve
+   * the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * A list of locations (e.g. "us-west1") that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/LocationName.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/LocationName.java new file mode 100644 index 00000000..7931dc84 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/LocationName.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.security.privateca.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class LocationName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "location", location); + } + + /** Builder for LocationName. */ + public static class Builder { + + private String project; + private String location; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder() {} + + private Builder(LocationName locationName) { + project = locationName.project; + location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof LocationName) { + LocationName that = (LocationName) o; + return (this.project.equals(that.project)) && (this.location.equals(that.location)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ObjectId.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ObjectId.java new file mode 100644 index 00000000..c74c6745 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ObjectId.java @@ -0,0 +1,718 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * An [ObjectId][google.cloud.security.privateca.v1beta1.ObjectId] specifies an object identifier (OID). These provide context
+ * and describe types in ASN.1 messages.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ObjectId} + */ +public final class ObjectId extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ObjectId) + ObjectIdOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectId.newBuilder() to construct. + private ObjectId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ObjectId() { + objectIdPath_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ObjectId(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ObjectId( + 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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + objectIdPath_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + objectIdPath_.addInt(input.readInt32()); + break; + } + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + objectIdPath_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + objectIdPath_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (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)) { + objectIdPath_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ObjectId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ObjectId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ObjectId.class, + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder.class); + } + + public static final int OBJECT_ID_PATH_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.IntList objectIdPath_; + /** + * + * + *
+   * Required. The parts of an OID path. The most significant parts of the path come
+   * first.
+   * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the objectIdPath. + */ + @java.lang.Override + public java.util.List getObjectIdPathList() { + return objectIdPath_; + } + /** + * + * + *
+   * Required. The parts of an OID path. The most significant parts of the path come
+   * first.
+   * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of objectIdPath. + */ + public int getObjectIdPathCount() { + return objectIdPath_.size(); + } + /** + * + * + *
+   * Required. The parts of an OID path. The most significant parts of the path come
+   * first.
+   * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The objectIdPath at the given index. + */ + public int getObjectIdPath(int index) { + return objectIdPath_.getInt(index); + } + + private int objectIdPathMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (getObjectIdPathList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(objectIdPathMemoizedSerializedSize); + } + for (int i = 0; i < objectIdPath_.size(); i++) { + output.writeInt32NoTag(objectIdPath_.getInt(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 < objectIdPath_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(objectIdPath_.getInt(i)); + } + size += dataSize; + if (!getObjectIdPathList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + objectIdPathMemoizedSerializedSize = 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.security.privateca.v1beta1.ObjectId)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ObjectId other = + (com.google.cloud.security.privateca.v1beta1.ObjectId) obj; + + if (!getObjectIdPathList().equals(other.getObjectIdPathList())) return false; + if (!unknownFields.equals(other.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 (getObjectIdPathCount() > 0) { + hash = (37 * hash) + OBJECT_ID_PATH_FIELD_NUMBER; + hash = (53 * hash) + getObjectIdPathList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.security.privateca.v1beta1.ObjectId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [ObjectId][google.cloud.security.privateca.v1beta1.ObjectId] specifies an object identifier (OID). These provide context
+   * and describe types in ASN.1 messages.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ObjectId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ObjectId) + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ObjectId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ObjectId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ObjectId.class, + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.ObjectId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + objectIdPath_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ObjectId_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ObjectId getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ObjectId.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ObjectId build() { + com.google.cloud.security.privateca.v1beta1.ObjectId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ObjectId buildPartial() { + com.google.cloud.security.privateca.v1beta1.ObjectId result = + new com.google.cloud.security.privateca.v1beta1.ObjectId(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + objectIdPath_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.objectIdPath_ = objectIdPath_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.ObjectId) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.ObjectId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.security.privateca.v1beta1.ObjectId other) { + if (other == com.google.cloud.security.privateca.v1beta1.ObjectId.getDefaultInstance()) + return this; + if (!other.objectIdPath_.isEmpty()) { + if (objectIdPath_.isEmpty()) { + objectIdPath_ = other.objectIdPath_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureObjectIdPathIsMutable(); + objectIdPath_.addAll(other.objectIdPath_); + } + 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.security.privateca.v1beta1.ObjectId parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ObjectId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.IntList objectIdPath_ = emptyIntList(); + + private void ensureObjectIdPathIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + objectIdPath_ = mutableCopy(objectIdPath_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. The parts of an OID path. The most significant parts of the path come
+     * first.
+     * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the objectIdPath. + */ + public java.util.List getObjectIdPathList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(objectIdPath_) + : objectIdPath_; + } + /** + * + * + *
+     * Required. The parts of an OID path. The most significant parts of the path come
+     * first.
+     * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of objectIdPath. + */ + public int getObjectIdPathCount() { + return objectIdPath_.size(); + } + /** + * + * + *
+     * Required. The parts of an OID path. The most significant parts of the path come
+     * first.
+     * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The objectIdPath at the given index. + */ + public int getObjectIdPath(int index) { + return objectIdPath_.getInt(index); + } + /** + * + * + *
+     * Required. The parts of an OID path. The most significant parts of the path come
+     * first.
+     * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The objectIdPath to set. + * @return This builder for chaining. + */ + public Builder setObjectIdPath(int index, int value) { + ensureObjectIdPathIsMutable(); + objectIdPath_.setInt(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parts of an OID path. The most significant parts of the path come
+     * first.
+     * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The objectIdPath to add. + * @return This builder for chaining. + */ + public Builder addObjectIdPath(int value) { + ensureObjectIdPathIsMutable(); + objectIdPath_.addInt(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parts of an OID path. The most significant parts of the path come
+     * first.
+     * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The objectIdPath to add. + * @return This builder for chaining. + */ + public Builder addAllObjectIdPath(java.lang.Iterable values) { + ensureObjectIdPathIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, objectIdPath_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parts of an OID path. The most significant parts of the path come
+     * first.
+     * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearObjectIdPath() { + objectIdPath_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + 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.security.privateca.v1beta1.ObjectId) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ObjectId) + private static final com.google.cloud.security.privateca.v1beta1.ObjectId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.ObjectId(); + } + + public static com.google.cloud.security.privateca.v1beta1.ObjectId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ObjectId(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ObjectId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ObjectIdOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ObjectIdOrBuilder.java new file mode 100644 index 00000000..a2295a8a --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ObjectIdOrBuilder.java @@ -0,0 +1,66 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ObjectIdOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ObjectId) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parts of an OID path. The most significant parts of the path come
+   * first.
+   * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the objectIdPath. + */ + java.util.List getObjectIdPathList(); + /** + * + * + *
+   * Required. The parts of an OID path. The most significant parts of the path come
+   * first.
+   * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of objectIdPath. + */ + int getObjectIdPathCount(); + /** + * + * + *
+   * Required. The parts of an OID path. The most significant parts of the path come
+   * first.
+   * 
+ * + * repeated int32 object_id_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The objectIdPath at the given index. + */ + int getObjectIdPath(int index); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/OperationMetadata.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/OperationMetadata.java new file mode 100644 index 00000000..3c7b51dc --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/OperationMetadata.java @@ -0,0 +1,1853 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + 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 10: + { + 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 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + verb_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + statusMessage_ = s; + break; + } + case 48: + { + requestedCancellation_ = input.readBool(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiVersion_ = 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.OperationMetadata.class, + com.google.cloud.security.privateca.v1beta1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .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. The time the operation finished running.
+   * 
+ * + * .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. The time the operation finished running.
+   * 
+ * + * .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 TARGET_FIELD_NUMBER = 3; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + private volatile java.lang.Object verb_; + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + private volatile java.lang.Object statusMessage_; + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_; + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object apiVersion_; + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!getVerbBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!getStatusMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!getVerbBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!getStatusMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.OperationMetadata other = + (com.google.cloud.security.privateca.v1beta1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!unknownFields.equals(other.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 (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.OperationMetadata) + com.google.cloud.security.privateca.v1beta1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.OperationMetadata.class, + com.google.cloud.security.privateca.v1beta1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + target_ = ""; + + verb_ = ""; + + statusMessage_ = ""; + + requestedCancellation_ = false; + + apiVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.OperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.OperationMetadata build() { + com.google.cloud.security.privateca.v1beta1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.OperationMetadata buildPartial() { + com.google.cloud.security.privateca.v1beta1.OperationMetadata result = + new com.google.cloud.security.privateca.v1beta1.OperationMetadata(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.target_ = target_; + result.verb_ = verb_; + result.statusMessage_ = statusMessage_; + result.requestedCancellation_ = requestedCancellation_; + result.apiVersion_ = apiVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.OperationMetadata) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.security.privateca.v1beta1.OperationMetadata other) { + if (other + == com.google.cloud.security.privateca.v1beta1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + 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.security.privateca.v1beta1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.OperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_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> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .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. The time the operation finished running.
+     * 
+ * + * .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. The time the operation finished running.
+     * 
+ * + * .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. The time the operation finished running.
+     * 
+ * + * .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. The time the operation finished running.
+     * 
+ * + * .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. The time the operation finished running.
+     * 
+ * + * .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. The time the operation finished running.
+     * 
+ * + * .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. The time the operation finished running.
+     * 
+ * + * .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. The time the operation finished running.
+     * 
+ * + * .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 java.lang.Object target_ = ""; + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + target_ = value; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + verb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + verb_ = value; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + statusMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + + statusMessage_ = getDefaultInstance().getStatusMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + statusMessage_ = value; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = getDefaultInstance().getApiVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.OperationMetadata) + private static final com.google.cloud.security.privateca.v1beta1.OperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.OperationMetadata(); + } + + public static com.google.cloud.security.privateca.v1beta1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/OperationMetadataOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/OperationMetadataOrBuilder.java new file mode 100644 index 00000000..a3f8cedf --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/OperationMetadataOrBuilder.java @@ -0,0 +1,217 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PrivateCaProto.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PrivateCaProto.java new file mode 100644 index 00000000..9b501bf8 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PrivateCaProto.java @@ -0,0 +1,762 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public final class PrivateCaProto { + private PrivateCaProto() {} + + 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_security_privateca_v1beta1_CreateCertificateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_RevokeCertificateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_RevokeCertificateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ActivateCertificateAuthorityRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ActivateCertificateAuthorityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateAuthorityRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateAuthorityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_DisableCertificateAuthorityRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_DisableCertificateAuthorityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_EnableCertificateAuthorityRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_EnableCertificateAuthorityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateAuthorityRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateAuthorityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_RestoreCertificateAuthorityRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_RestoreCertificateAuthorityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ScheduleDeleteCertificateAuthorityRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ScheduleDeleteCertificateAuthorityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateAuthorityRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateAuthorityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRevocationListRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRevocationListRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRevocationListRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRevocationListRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRevocationListRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRevocationListRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CreateReusableConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CreateReusableConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_DeleteReusableConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_DeleteReusableConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_GetReusableConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_GetReusableConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_UpdateReusableConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_UpdateReusableConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/security/privateca/v1beta" + + "1/service.proto\022\'google.cloud.security.p" + + "rivateca.v1beta1\032\034google/api/annotations" + + ".proto\032\027google/api/client.proto\032\037google/" + + "api/field_behavior.proto\032\031google/api/res" + + "ource.proto\0327google/cloud/security/priva" + + "teca/v1beta1/resources.proto\032#google/lon" + + "grunning/operations.proto\032 google/protob" + + "uf/field_mask.proto\032\037google/protobuf/tim" + + "estamp.proto\"\347\001\n\030CreateCertificateReques" + + "t\022E\n\006parent\030\001 \001(\tB5\340A\002\372A/\n-privateca.goo" + + "gleapis.com/CertificateAuthority\022\033\n\016cert" + + "ificate_id\030\002 \001(\tB\003\340A\001\022N\n\013certificate\030\003 \001" + + "(\01324.google.cloud.security.privateca.v1b" + + "eta1.CertificateB\003\340A\002\022\027\n\nrequest_id\030\004 \001(" + + "\tB\003\340A\001\"S\n\025GetCertificateRequest\022:\n\004name\030" + + "\001 \001(\tB,\340A\002\372A&\n$privateca.googleapis.com/" + + "Certificate\"\275\001\n\027ListCertificatesRequest\022" + + "E\n\006parent\030\001 \001(\tB5\340A\002\372A/\n-privateca.googl" + + "eapis.com/CertificateAuthority\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\025\n\010order_by\030\005 \001(\tB\003" + + "\340A\001\"\224\001\n\030ListCertificatesResponse\022J\n\014cert" + + "ificates\030\001 \003(\01324.google.cloud.security.p" + + "rivateca.v1beta1.Certificate\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"\277\001\n\030R" + + "evokeCertificateRequest\022:\n\004name\030\001 \001(\tB,\340" + + "A\002\372A&\n$privateca.googleapis.com/Certific" + + "ate\022N\n\006reason\030\002 \001(\01629.google.cloud.secur" + + "ity.privateca.v1beta1.RevocationReasonB\003" + + "\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"\271\001\n\030UpdateC" + + "ertificateRequest\022N\n\013certificate\030\001 \001(\01324" + + ".google.cloud.security.privateca.v1beta1" + + ".CertificateB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032" + + ".google.protobuf.FieldMaskB\003\340A\002\022\027\n\nreque" + + "st_id\030\003 \001(\tB\003\340A\001\"\201\002\n#ActivateCertificate" + + "AuthorityRequest\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-" + + "privateca.googleapis.com/CertificateAuth" + + "ority\022\037\n\022pem_ca_certificate\030\002 \001(\tB\003\340A\002\022[" + + "\n\022subordinate_config\030\003 \001(\0132:.google.clou" + + "d.security.privateca.v1beta1.Subordinate" + + "ConfigB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\201\002\n" + + "!CreateCertificateAuthorityRequest\0229\n\006pa" + + "rent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis" + + ".com/Location\022%\n\030certificate_authority_i" + + "d\030\002 \001(\tB\003\340A\002\022a\n\025certificate_authority\030\003 " + + "\001(\0132=.google.cloud.security.privateca.v1" + + "beta1.CertificateAuthorityB\003\340A\002\022\027\n\nreque" + + "st_id\030\004 \001(\tB\003\340A\001\"\202\001\n\"DisableCertificateA" + + "uthorityRequest\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-p" + + "rivateca.googleapis.com/CertificateAutho" + + "rity\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\201\001\n!Enable" + + "CertificateAuthorityRequest\022C\n\004name\030\001 \001(" + + "\tB5\340A\002\372A/\n-privateca.googleapis.com/Cert" + + "ificateAuthority\022\027\n\nrequest_id\030\002 \001(\tB\003\340A" + + "\001\"j\n#FetchCertificateAuthorityCsrRequest" + + "\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-privateca.google" + + "apis.com/CertificateAuthority\"<\n$FetchCe" + + "rtificateAuthorityCsrResponse\022\024\n\007pem_csr" + + "\030\001 \001(\tB\003\340A\003\"e\n\036GetCertificateAuthorityRe" + + "quest\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-privateca.g" + + "oogleapis.com/CertificateAuthority\"\273\001\n!L" + + "istCertificateAuthoritiesRequest\0229\n\006pare" + + "nt\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.c" + + "om/Location\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\np" + + "age_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A" + + "\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"\262\001\n\"ListCertifi" + + "cateAuthoritiesResponse\022^\n\027certificate_a" + + "uthorities\030\001 \003(\0132=.google.cloud.security" + + ".privateca.v1beta1.CertificateAuthority\022" + + "\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030" + + "\003 \003(\t\"\202\001\n\"RestoreCertificateAuthorityReq" + + "uest\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-privateca.go" + + "ogleapis.com/CertificateAuthority\022\027\n\nreq" + + "uest_id\030\002 \001(\tB\003\340A\001\"\211\001\n)ScheduleDeleteCer" + + "tificateAuthorityRequest\022C\n\004name\030\001 \001(\tB5" + + "\340A\002\372A/\n-privateca.googleapis.com/Certifi" + + "cateAuthority\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\325" + + "\001\n!UpdateCertificateAuthorityRequest\022a\n\025" + + "certificate_authority\030\001 \001(\0132=.google.clo" + + "ud.security.privateca.v1beta1.Certificat" + + "eAuthorityB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.g" + + "oogle.protobuf.FieldMaskB\003\340A\002\022\027\n\nrequest" + + "_id\030\003 \001(\tB\003\340A\001\"\243\002\n&CreateCertificateRevo" + + "cationListRequest\022E\n\006parent\030\001 \001(\tB5\340A\002\372A" + + "/\n-privateca.googleapis.com/CertificateA" + + "uthority\022+\n\036certificate_revocation_list_" + + "id\030\002 \001(\tB\003\340A\002\022l\n\033certificate_revocation_" + + "list\030\003 \001(\0132B.google.cloud.security.priva" + + "teca.v1beta1.CertificateRevocationListB\003" + + "\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"o\n#GetCerti" + + "ficateRevocationListRequest\022H\n\004name\030\001 \001(" + + "\tB:\340A\002\372A4\n2privateca.googleapis.com/Cert" + + "ificateRevocationList\"\313\001\n%ListCertificat" + + "eRevocationListsRequest\022E\n\006parent\030\001 \001(\tB" + + "5\340A\002\372A/\n-privateca.googleapis.com/Certif" + + "icateAuthority\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\023\n\006filter\030\004 \001(\tB" + + "\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"\300\001\n&ListCert" + + "ificateRevocationListsResponse\022h\n\034certif" + + "icate_revocation_lists\030\001 \003(\0132B.google.cl" + + "oud.security.privateca.v1beta1.Certifica" + + "teRevocationList\022\027\n\017next_page_token\030\002 \001(" + + "\t\022\023\n\013unreachable\030\003 \003(\t\"\345\001\n&UpdateCertifi" + + "cateRevocationListRequest\022l\n\033certificate" + + "_revocation_list\030\001 \001(\0132B.google.cloud.se" + + "curity.privateca.v1beta1.CertificateRevo" + + "cationListB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.g" + + "oogle.protobuf.FieldMaskB\003\340A\002\022\027\n\nrequest" + + "_id\030\003 \001(\tB\003\340A\001\"\351\001\n\033CreateReusableConfigR" + + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + + "s.googleapis.com/Location\022\037\n\022reusable_co" + + "nfig_id\030\002 \001(\tB\003\340A\002\022U\n\017reusable_config\030\003 " + + "\001(\01327.google.cloud.security.privateca.v1" + + "beta1.ReusableConfigB\003\340A\002\022\027\n\nrequest_id\030" + + "\004 \001(\tB\003\340A\001\"u\n\033DeleteReusableConfigReques" + + "t\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'privateca.googl" + + "eapis.com/ReusableConfig\022\027\n\nrequest_id\030\002" + + " \001(\tB\003\340A\001\"Y\n\030GetReusableConfigRequest\022=\n" + + "\004name\030\001 \001(\tB/\340A\002\372A)\n\'privateca.googleapi" + + "s.com/ReusableConfig\"\264\001\n\032ListReusableCon" + + "figsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!loc" + + "ations.googleapis.com/Location\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\025\n\010order_by\030\005 \001(\tB\003" + + "\340A\001\"\236\001\n\033ListReusableConfigsResponse\022Q\n\020r" + + "eusable_configs\030\001 \003(\01327.google.cloud.sec" + + "urity.privateca.v1beta1.ReusableConfig\022\027" + + "\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003" + + " \003(\t\"\303\001\n\033UpdateReusableConfigRequest\022U\n\017" + + "reusable_config\030\001 \001(\01327.google.cloud.sec" + + "urity.privateca.v1beta1.ReusableConfigB\003" + + "\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protob" + + "uf.FieldMaskB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340" + + "A\001\"\200\002\n\021OperationMetadata\0224\n\013create_time\030" + + "\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221" + + "\n\010end_time\030\002 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030\004" + + " \001(\tB\003\340A\003\022\033\n\016status_message\030\005 \001(\tB\003\340A\003\022#" + + "\n\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013a" + + "pi_version\030\007 \001(\tB\003\340A\0032\3056\n\033CertificateAut" + + "horityService\022\226\002\n\021CreateCertificate\022A.go" + + "ogle.cloud.security.privateca.v1beta1.Cr" + + "eateCertificateRequest\0324.google.cloud.se" + + "curity.privateca.v1beta1.Certificate\"\207\001\202" + + "\323\344\223\002]\"N/v1beta1/{parent=projects/*/locat" + + "ions/*/certificateAuthorities/*}/certifi" + + "cates:\013certificate\332A!parent,certificate," + + "certificate_id\022\345\001\n\016GetCertificate\022>.goog" + + "le.cloud.security.privateca.v1beta1.GetC" + + "ertificateRequest\0324.google.cloud.securit" + + "y.privateca.v1beta1.Certificate\"]\202\323\344\223\002P\022" + + "N/v1beta1/{name=projects/*/locations/*/c" + + "ertificateAuthorities/*/certificates/*}\332" + + "A\004name\022\370\001\n\020ListCertificates\022@.google.clo" + + "ud.security.privateca.v1beta1.ListCertif" + + "icatesRequest\032A.google.cloud.security.pr" + + "ivateca.v1beta1.ListCertificatesResponse" + + "\"_\202\323\344\223\002P\022N/v1beta1/{parent=projects/*/lo" + + "cations/*/certificateAuthorities/*}/cert" + + "ificates\332A\006parent\022\365\001\n\021RevokeCertificate\022" + + "A.google.cloud.security.privateca.v1beta" + + "1.RevokeCertificateRequest\0324.google.clou" + + "d.security.privateca.v1beta1.Certificate" + + "\"g\202\323\344\223\002Z\"U/v1beta1/{name=projects/*/loca" + + "tions/*/certificateAuthorities/*/certifi" + + "cates/*}:revoke:\001*\332A\004name\022\230\002\n\021UpdateCert" + + "ificate\022A.google.cloud.security.privatec" + + "a.v1beta1.UpdateCertificateRequest\0324.goo" + + "gle.cloud.security.privateca.v1beta1.Cer" + + "tificate\"\211\001\202\323\344\223\002i2Z/v1beta1/{certificate" + + ".name=projects/*/locations/*/certificate" + + "Authorities/*/certificates/*}:\013certifica" + + "te\332A\027certificate,update_mask\022\224\002\n\034Activat" + + "eCertificateAuthority\022L.google.cloud.sec" + + "urity.privateca.v1beta1.ActivateCertific" + + "ateAuthorityRequest\032\035.google.longrunning" + + ".Operation\"\206\001\202\323\344\223\002M\"H/v1beta1/{name=proj" + + "ects/*/locations/*/certificateAuthoritie" + + "s/*}:activate:\001*\332A\004name\312A)\n\024CertificateA" + + "uthority\022\021OperationMetadata\022\314\002\n\032CreateCe" + + "rtificateAuthority\022J.google.cloud.securi" + + "ty.privateca.v1beta1.CreateCertificateAu" + + "thorityRequest\032\035.google.longrunning.Oper" + + "ation\"\302\001\202\323\344\223\002X\"?/v1beta1/{parent=project" + + "s/*/locations/*}/certificateAuthorities:" + + "\025certificate_authority\332A5parent,certific" + + "ate_authority,certificate_authority_id\312A" + + ")\n\024CertificateAuthority\022\021OperationMetada" + + "ta\022\221\002\n\033DisableCertificateAuthority\022K.goo" + + "gle.cloud.security.privateca.v1beta1.Dis" + + "ableCertificateAuthorityRequest\032\035.google" + + ".longrunning.Operation\"\205\001\202\323\344\223\002L\"G/v1beta" + + "1/{name=projects/*/locations/*/certifica" + + "teAuthorities/*}:disable:\001*\332A\004name\312A)\n\024C" + + "ertificateAuthority\022\021OperationMetadata\022\216" + + "\002\n\032EnableCertificateAuthority\022J.google.c" + + "loud.security.privateca.v1beta1.EnableCe" + + "rtificateAuthorityRequest\032\035.google.longr" + + "unning.Operation\"\204\001\202\323\344\223\002K\"F/v1beta1/{nam" + + "e=projects/*/locations/*/certificateAuth" + + "orities/*}:enable:\001*\332A\004name\312A)\n\024Certific" + + "ateAuthority\022\021OperationMetadata\022\221\002\n\034Fetc" + + "hCertificateAuthorityCsr\022L.google.cloud." + + "security.privateca.v1beta1.FetchCertific" + + "ateAuthorityCsrRequest\032M.google.cloud.se" + + "curity.privateca.v1beta1.FetchCertificat" + + "eAuthorityCsrResponse\"T\202\323\344\223\002G\022E/v1beta1/" + + "{name=projects/*/locations/*/certificate" + + "Authorities/*}:fetch\332A\004name\022\361\001\n\027GetCerti" + + "ficateAuthority\022G.google.cloud.security." + + "privateca.v1beta1.GetCertificateAuthorit" + + "yRequest\032=.google.cloud.security.private" + + "ca.v1beta1.CertificateAuthority\"N\202\323\344\223\002A\022" + + "?/v1beta1/{name=projects/*/locations/*/c" + + "ertificateAuthorities/*}\332A\004name\022\207\002\n\032List" + + "CertificateAuthorities\022J.google.cloud.se" + + "curity.privateca.v1beta1.ListCertificate" + + "AuthoritiesRequest\032K.google.cloud.securi" + + "ty.privateca.v1beta1.ListCertificateAuth" + + "oritiesResponse\"P\202\323\344\223\002A\022?/v1beta1/{paren" + + "t=projects/*/locations/*}/certificateAut" + + "horities\332A\006parent\022\221\002\n\033RestoreCertificate" + + "Authority\022K.google.cloud.security.privat" + + "eca.v1beta1.RestoreCertificateAuthorityR" + + "equest\032\035.google.longrunning.Operation\"\205\001" + + "\202\323\344\223\002L\"G/v1beta1/{name=projects/*/locati" + + "ons/*/certificateAuthorities/*}:restore:" + + "\001*\332A\004name\312A)\n\024CertificateAuthority\022\021Oper" + + "ationMetadata\022\246\002\n\"ScheduleDeleteCertific" + + "ateAuthority\022R.google.cloud.security.pri" + + "vateca.v1beta1.ScheduleDeleteCertificate" + + "AuthorityRequest\032\035.google.longrunning.Op" + + "eration\"\214\001\202\323\344\223\002S\"N/v1beta1/{name=project" + + "s/*/locations/*/certificateAuthorities/*" + + "}:scheduleDelete:\001*\332A\004name\312A)\n\024Certifica" + + "teAuthority\022\021OperationMetadata\022\316\002\n\032Updat" + + "eCertificateAuthority\022J.google.cloud.sec" + + "urity.privateca.v1beta1.UpdateCertificat" + + "eAuthorityRequest\032\035.google.longrunning.O" + + "peration\"\304\001\202\323\344\223\002n2U/v1beta1/{certificate" + + "_authority.name=projects/*/locations/*/c" + + "ertificateAuthorities/*}:\025certificate_au" + + "thority\332A!certificate_authority,update_m" + + "ask\312A)\n\024CertificateAuthority\022\021OperationM" + + "etadata\022\212\003\n\037CreateCertificateRevocationL" + + "ist\022O.google.cloud.security.privateca.v1" + + "beta1.CreateCertificateRevocationListReq" + + "uest\032\035.google.longrunning.Operation\"\366\001\202\323" + + "\344\223\002{\"\\/v1beta1/{parent=projects/*/locati" + + "ons/*/certificateAuthorities/*}/certific" + + "ateRevocationLists:\033certificate_revocati" + + "on_list\332AAparent,certificate_revocation_" + + "list,certificate_revocation_list_id\312A.\n\031" + + "CertificateRevocationList\022\021OperationMeta" + + "data\022\235\002\n\034GetCertificateRevocationList\022L." + + "google.cloud.security.privateca.v1beta1." + + "GetCertificateRevocationListRequest\032B.go" + + "ogle.cloud.security.privateca.v1beta1.Ce" + + "rtificateRevocationList\"k\202\323\344\223\002^\022\\/v1beta" + + "1/{name=projects/*/locations/*/certifica" + + "teAuthorities/*/certificateRevocationLis" + + "ts/*}\332A\004name\022\260\002\n\036ListCertificateRevocati" + + "onLists\022N.google.cloud.security.privatec" + + "a.v1beta1.ListCertificateRevocationLists" + + "Request\032O.google.cloud.security.privatec" + + "a.v1beta1.ListCertificateRevocationLists" + + "Response\"m\202\323\344\223\002^\022\\/v1beta1/{parent=proje" + + "cts/*/locations/*/certificateAuthorities" + + "/*}/certificateRevocationLists\332A\006parent\022" + + "\215\003\n\037UpdateCertificateRevocationList\022O.go" + + "ogle.cloud.security.privateca.v1beta1.Up" + + "dateCertificateRevocationListRequest\032\035.g" + + "oogle.longrunning.Operation\"\371\001\202\323\344\223\002\227\0012x/" + + "v1beta1/{certificate_revocation_list.nam" + + "e=projects/*/locations/*/certificateAuth" + + "orities/*/certificateRevocationLists/*}:" + + "\033certificate_revocation_list\332A\'certifica" + + "te_revocation_list,update_mask\312A.\n\031Certi" + + "ficateRevocationList\022\021OperationMetadata\022" + + "\241\002\n\024CreateReusableConfig\022D.google.cloud." + + "security.privateca.v1beta1.CreateReusabl" + + "eConfigRequest\032\035.google.longrunning.Oper" + + "ation\"\243\001\202\323\344\223\002K\"8/v1beta1/{parent=project" + + "s/*/locations/*}/reusableConfigs:\017reusab" + + "le_config\332A)parent,reusable_config,reusa" + + "ble_config_id\312A#\n\016ReusableConfig\022\021Operat" + + "ionMetadata\022\232\002\n\024DeleteReusableConfig\022D.g" + + "oogle.cloud.security.privateca.v1beta1.D" + + "eleteReusableConfigRequest\032\035.google.long" + + "running.Operation\"\234\001\202\323\344\223\002:*8/v1beta1/{na" + + "me=projects/*/locations/*/reusableConfig" + + "s/*}\332A\004name\312AR\n\025google.protobuf.Empty\0229g" + + "oogle.cloud.security.privateca.v1beta1.O" + + "perationMetadata\022\330\001\n\021GetReusableConfig\022A" + + ".google.cloud.security.privateca.v1beta1" + + ".GetReusableConfigRequest\0327.google.cloud" + + ".security.privateca.v1beta1.ReusableConf" + + "ig\"G\202\323\344\223\002:\0228/v1beta1/{name=projects/*/lo" + + "cations/*/reusableConfigs/*}\332A\004name\022\353\001\n\023" + + "ListReusableConfigs\022C.google.cloud.secur" + + "ity.privateca.v1beta1.ListReusableConfig" + + "sRequest\032D.google.cloud.security.private" + + "ca.v1beta1.ListReusableConfigsResponse\"I" + + "\202\323\344\223\002:\0228/v1beta1/{parent=projects/*/loca" + + "tions/*}/reusableConfigs\332A\006parent\022\243\002\n\024Up" + + "dateReusableConfig\022D.google.cloud.securi" + + "ty.privateca.v1beta1.UpdateReusableConfi" + + "gRequest\032\035.google.longrunning.Operation\"" + + "\245\001\202\323\344\223\002[2H/v1beta1/{reusable_config.name" + + "=projects/*/locations/*/reusableConfigs/" + + "*}:\017reusable_config\332A\033reusable_config,up" + + "date_mask\312A#\n\016ReusableConfig\022\021OperationM" + + "etadata\032L\312A\030privateca.googleapis.com\322A.h" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tformB\276\001\n+com.google.cloud.security.priv" + + "ateca.v1beta1B\016PrivateCaProtoP\001ZPgoogle." + + "golang.org/genproto/googleapis/cloud/sec" + + "urity/privateca/v1beta1;privateca\370\001\001\252\002\'G" + + "oogle.Cloud.Security.PrivateCA.V1Beta1b\006" + + "proto3" + }; + 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.security.privateca.v1beta1.PrivateCaResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRequest_descriptor, + new java.lang.String[] { + "Parent", "CertificateId", "Certificate", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ListCertificatesResponse_descriptor, + new java.lang.String[] { + "Certificates", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_security_privateca_v1beta1_RevokeCertificateRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_security_privateca_v1beta1_RevokeCertificateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_RevokeCertificateRequest_descriptor, + new java.lang.String[] { + "Name", "Reason", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRequest_descriptor, + new java.lang.String[] { + "Certificate", "UpdateMask", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_ActivateCertificateAuthorityRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_security_privateca_v1beta1_ActivateCertificateAuthorityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ActivateCertificateAuthorityRequest_descriptor, + new java.lang.String[] { + "Name", "PemCaCertificate", "SubordinateConfig", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateAuthorityRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateAuthorityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateAuthorityRequest_descriptor, + new java.lang.String[] { + "Parent", "CertificateAuthorityId", "CertificateAuthority", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_DisableCertificateAuthorityRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_security_privateca_v1beta1_DisableCertificateAuthorityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_DisableCertificateAuthorityRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_EnableCertificateAuthorityRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_security_privateca_v1beta1_EnableCertificateAuthorityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_EnableCertificateAuthorityRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_FetchCertificateAuthorityCsrResponse_descriptor, + new java.lang.String[] { + "PemCsr", + }); + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateAuthorityRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateAuthorityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateAuthorityRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateAuthoritiesResponse_descriptor, + new java.lang.String[] { + "CertificateAuthorities", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_security_privateca_v1beta1_RestoreCertificateAuthorityRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_security_privateca_v1beta1_RestoreCertificateAuthorityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_RestoreCertificateAuthorityRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_ScheduleDeleteCertificateAuthorityRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_security_privateca_v1beta1_ScheduleDeleteCertificateAuthorityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ScheduleDeleteCertificateAuthorityRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateAuthorityRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateAuthorityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateAuthorityRequest_descriptor, + new java.lang.String[] { + "CertificateAuthority", "UpdateMask", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRevocationListRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRevocationListRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CreateCertificateRevocationListRequest_descriptor, + new java.lang.String[] { + "Parent", "CertificateRevocationListId", "CertificateRevocationList", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRevocationListRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRevocationListRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_GetCertificateRevocationListRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ListCertificateRevocationListsResponse_descriptor, + new java.lang.String[] { + "CertificateRevocationLists", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRevocationListRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRevocationListRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRevocationListRequest_descriptor, + new java.lang.String[] { + "CertificateRevocationList", "UpdateMask", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_CreateReusableConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_security_privateca_v1beta1_CreateReusableConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CreateReusableConfigRequest_descriptor, + new java.lang.String[] { + "Parent", "ReusableConfigId", "ReusableConfig", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_DeleteReusableConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_security_privateca_v1beta1_DeleteReusableConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_DeleteReusableConfigRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_GetReusableConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_security_privateca_v1beta1_GetReusableConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_GetReusableConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ListReusableConfigsResponse_descriptor, + new java.lang.String[] { + "ReusableConfigs", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_security_privateca_v1beta1_UpdateReusableConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_security_privateca_v1beta1_UpdateReusableConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_UpdateReusableConfigRequest_descriptor, + new java.lang.String[] { + "ReusableConfig", "UpdateMask", "RequestId", + }); + internal_static_google_cloud_security_privateca_v1beta1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_security_privateca_v1beta1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.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.security.privateca.v1beta1.PrivateCaResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PrivateCaResourcesProto.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PrivateCaResourcesProto.java new file mode 100644 index 00000000..12c75107 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PrivateCaResourcesProto.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/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public final class PrivateCaResourcesProto { + private PrivateCaResourcesProto() {} + + 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_security_privateca_v1beta1_CertificateAuthority_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_IssuingOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_IssuingOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedConfigList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedConfigList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedSubjectAltNames_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedSubjectAltNames_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_IssuanceModes_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_IssuanceModes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_AccessUrls_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_AccessUrls_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_KeyVersionSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_KeyVersionSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_RevokedCertificate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_RevokedCertificate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_Certificate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_Certificate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_Certificate_RevocationDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_Certificate_RevocationDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_Certificate_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_Certificate_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_CaOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_CaOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigWrapper_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigWrapper_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_SubordinateConfigChain_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_SubordinateConfigChain_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_PublicKey_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_PublicKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_SubjectConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_SubjectConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_SubjectDescription_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_SubjectDescription_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_KeyId_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_KeyId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_CertificateFingerprint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_CertificateFingerprint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_ObjectId_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_ObjectId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_X509Extension_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_X509Extension_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_KeyUsageOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_KeyUsageOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_ExtendedKeyUsageOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_ExtendedKeyUsageOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_Subject_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_Subject_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_security_privateca_v1beta1_SubjectAltNames_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_security_privateca_v1beta1_SubjectAltNames_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n7google/cloud/security/privateca/v1beta" + + "1/resources.proto\022\'google.cloud.security" + + ".privateca.v1beta1\032\037google/api/field_beh" + + "avior.proto\032\031google/api/resource.proto\032\036" + + "google/protobuf/duration.proto\032\037google/p" + + "rotobuf/timestamp.proto\032\036google/protobuf" + + "/wrappers.proto\032\034google/api/annotations." + + "proto\"\332\033\n\024CertificateAuthority\022\021\n\004name\030\001" + + " \001(\tB\003\340A\003\022X\n\004type\030\002 \001(\0162B.google.cloud.s" + + "ecurity.privateca.v1beta1.CertificateAut" + + "hority.TypeB\006\340A\002\340A\005\022X\n\004tier\030\003 \001(\0162B.goog" + + "le.cloud.security.privateca.v1beta1.Cert" + + "ificateAuthority.TierB\006\340A\002\340A\005\022R\n\006config\030" + + "\004 \001(\0132:.google.cloud.security.privateca." + + "v1beta1.CertificateConfigB\006\340A\002\340A\005\0220\n\010lif" + + "etime\030\005 \001(\0132\031.google.protobuf.DurationB\003" + + "\340A\002\022f\n\010key_spec\030\006 \001(\0132L.google.cloud.sec" + + "urity.privateca.v1beta1.CertificateAutho" + + "rity.KeyVersionSpecB\006\340A\002\340A\005\022y\n\022certifica" + + "te_policy\030\007 \001(\0132X.google.cloud.security." + + "privateca.v1beta1.CertificateAuthority.C" + + "ertificateAuthorityPolicyB\003\340A\001\022j\n\017issuin" + + "g_options\030\010 \001(\0132L.google.cloud.security." + + "privateca.v1beta1.CertificateAuthority.I" + + "ssuingOptionsB\003\340A\001\022[\n\022subordinate_config" + + "\030\023 \001(\0132:.google.cloud.security.privateca" + + ".v1beta1.SubordinateConfigB\003\340A\001\022W\n\005state" + + "\030\n \001(\0162C.google.cloud.security.privateca" + + ".v1beta1.CertificateAuthority.StateB\003\340A\003" + + "\022 \n\023pem_ca_certificates\030\t \003(\tB\003\340A\003\022i\n\033ca" + + "_certificate_descriptions\030\014 \003(\0132?.google" + + ".cloud.security.privateca.v1beta1.Certif" + + "icateDescriptionB\003\340A\003\022\027\n\ngcs_bucket\030\r \001(" + + "\tB\003\340A\005\022b\n\013access_urls\030\016 \001(\0132H.google.clo" + + "ud.security.privateca.v1beta1.Certificat" + + "eAuthority.AccessUrlsB\003\340A\003\0224\n\013create_tim" + + "e\030\017 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\0224\n\013update_time\030\020 \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003\0224\n\013delete_time\030\021 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\022^\n\006labels\030\022" + + " \003(\0132I.google.cloud.security.privateca.v" + + "1beta1.CertificateAuthority.LabelsEntryB" + + "\003\340A\001\032W\n\016IssuingOptions\022 \n\023include_ca_cer" + + "t_url\030\001 \001(\010B\003\340A\002\022#\n\026include_crl_access_u" + + "rl\030\002 \001(\010B\003\340A\002\032\276\t\n\032CertificateAuthorityPo" + + "licy\022\216\001\n\023allowed_config_list\030\001 \001(\0132j.goo" + + "gle.cloud.security.privateca.v1beta1.Cer" + + "tificateAuthority.CertificateAuthorityPo" + + "licy.AllowedConfigListB\003\340A\001H\000\022f\n\027overwri" + + "te_config_values\030\002 \001(\0132>.google.cloud.se" + + "curity.privateca.v1beta1.ReusableConfigW" + + "rapperB\003\340A\001H\000\022b\n#allowed_locations_and_o" + + "rganizations\030\003 \003(\01320.google.cloud.securi" + + "ty.privateca.v1beta1.SubjectB\003\340A\001\022!\n\024all" + + "owed_common_names\030\004 \003(\tB\003\340A\001\022\212\001\n\014allowed" + + "_sans\030\005 \001(\0132o.google.cloud.security.priv" + + "ateca.v1beta1.CertificateAuthority.Certi" + + "ficateAuthorityPolicy.AllowedSubjectAltN" + + "amesB\003\340A\001\0228\n\020maximum_lifetime\030\006 \001(\0132\031.go" + + "ogle.protobuf.DurationB\003\340A\001\022\213\001\n\026allowed_" + + "issuance_modes\030\010 \001(\0132f.google.cloud.secu" + + "rity.privateca.v1beta1.CertificateAuthor" + + "ity.CertificateAuthorityPolicy.IssuanceM" + + "odesB\003\340A\001\032w\n\021AllowedConfigList\022b\n\025allowe" + + "d_config_values\030\001 \003(\0132>.google.cloud.sec" + + "urity.privateca.v1beta1.ReusableConfigWr" + + "apperB\003\340A\002\032\336\001\n\026AllowedSubjectAltNames\022\036\n" + + "\021allowed_dns_names\030\001 \003(\tB\003\340A\001\022\031\n\014allowed" + + "_uris\030\002 \003(\tB\003\340A\001\022$\n\027allowed_email_addres" + + "ses\030\003 \003(\tB\003\340A\001\022\030\n\013allowed_ips\030\004 \003(\tB\003\340A\001" + + "\022)\n\034allow_globbing_dns_wildcards\030\005 \001(\010B\003" + + "\340A\001\022\036\n\021allow_custom_sans\030\006 \001(\010B\003\340A\001\032`\n\rI" + + "ssuanceModes\022%\n\030allow_csr_based_issuance" + + "\030\001 \001(\010B\003\340A\002\022(\n\033allow_config_based_issuan" + + "ce\030\002 \001(\010B\003\340A\002B\017\n\rconfig_policy\032G\n\nAccess" + + "Urls\022!\n\031ca_certificate_access_url\030\001 \001(\t\022" + + "\026\n\016crl_access_url\030\002 \001(\t\032\257\001\n\016KeyVersionSp" + + "ec\022$\n\025cloud_kms_key_version\030\001 \001(\tB\003\340A\002H\000" + + "\022i\n\talgorithm\030\002 \001(\0162O.google.cloud.secur" + + "ity.privateca.v1beta1.CertificateAuthori" + + "ty.SignHashAlgorithmB\003\340A\002H\000B\014\n\nKeyVersio" + + "n\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\">\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\017" + + "\n\013SELF_SIGNED\020\001\022\017\n\013SUBORDINATE\020\002\"8\n\004Tier" + + "\022\024\n\020TIER_UNSPECIFIED\020\000\022\016\n\nENTERPRISE\020\001\022\n" + + "\n\006DEVOPS\020\002\"g\n\005State\022\025\n\021STATE_UNSPECIFIED" + + "\020\000\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002\022\026\n\022PENDING" + + "_ACTIVATION\020\003\022\024\n\020PENDING_DELETION\020\004\"\256\001\n\021" + + "SignHashAlgorithm\022#\n\037SIGN_HASH_ALGORITHM" + + "_UNSPECIFIED\020\000\022\030\n\024RSA_PSS_2048_SHA_256\020\001" + + "\022\030\n\024RSA_PSS_3072_SHA_256\020\002\022\030\n\024RSA_PSS_40" + + "96_SHA_256\020\003\022\022\n\016EC_P256_SHA256\020\004\022\022\n\016EC_P" + + "384_SHA384\020\005:\213\001\352A\207\001\n-privateca.googleapi" + + "s.com/CertificateAuthority\022Vprojects/{pr" + + "oject}/locations/{location}/certificateA" + + "uthorities/{certificate_authority}\"\371\007\n\031C" + + "ertificateRevocationList\022\021\n\004name\030\001 \001(\tB\003" + + "\340A\003\022\034\n\017sequence_number\030\002 \001(\003B\003\340A\003\022x\n\024rev" + + "oked_certificates\030\003 \003(\0132U.google.cloud.s" + + "ecurity.privateca.v1beta1.CertificateRev" + + "ocationList.RevokedCertificateB\003\340A\003\022\024\n\007p" + + "em_crl\030\004 \001(\tB\003\340A\003\022\027\n\naccess_url\030\005 \001(\tB\003\340" + + "A\003\022\\\n\005state\030\006 \001(\0162H.google.cloud.securit" + + "y.privateca.v1beta1.CertificateRevocatio" + + "nList.StateB\003\340A\003\0224\n\013create_time\030\007 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\0224\n\013update" + + "_time\030\010 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\022c\n\006labels\030\t \003(\0132N.google.cloud.secu" + + "rity.privateca.v1beta1.CertificateRevoca" + + "tionList.LabelsEntryB\003\340A\001\032\232\001\n\022RevokedCer" + + "tificate\022\023\n\013certificate\030\001 \001(\t\022\031\n\021hex_ser" + + "ial_number\030\002 \001(\t\022T\n\021revocation_reason\030\003 " + + "\001(\01629.google.cloud.security.privateca.v1" + + "beta1.RevocationReason\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\":\n\005State\022\025" + + "\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\016\n\nSUP" + + "ERSEDED\020\002:\312\001\352A\306\001\n2privateca.googleapis.c" + + "om/CertificateRevocationList\022\217\001projects/" + + "{project}/locations/{location}/certifica" + + "teAuthorities/{certificate_authority}/ce" + + "rtificateRevocationLists/{certificate_re" + + "vocation_list}\"\227\010\n\013Certificate\022\021\n\004name\030\001" + + " \001(\tB\003\340A\003\022\026\n\007pem_csr\030\002 \001(\tB\003\340A\005H\000\022Q\n\006con" + + "fig\030\003 \001(\0132:.google.cloud.security.privat" + + "eca.v1beta1.CertificateConfigB\003\340A\005H\000\0220\n\010" + + "lifetime\030\004 \001(\0132\031.google.protobuf.Duratio" + + "nB\003\340A\002\022g\n\022revocation_details\030\005 \001(\0132F.goo" + + "gle.cloud.security.privateca.v1beta1.Cer" + + "tificate.RevocationDetailsB\003\340A\003\022\034\n\017pem_c" + + "ertificate\030\006 \001(\tB\003\340A\003\022e\n\027certificate_des" + + "cription\030\007 \001(\0132?.google.cloud.security.p" + + "rivateca.v1beta1.CertificateDescriptionB" + + "\003\340A\003\022\"\n\025pem_certificate_chain\030\010 \003(\tB\003\340A\003" + + "\0224\n\013create_time\030\t \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003\0224\n\013update_time\030\n \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\022U\n\006labels\030\013" + + " \003(\0132@.google.cloud.security.privateca.v" + + "1beta1.Certificate.LabelsEntryB\003\340A\001\032\235\001\n\021" + + "RevocationDetails\022S\n\020revocation_state\030\001 " + + "\001(\01629.google.cloud.security.privateca.v1" + + "beta1.RevocationReason\0223\n\017revocation_tim" + + "e\030\002 \001(\0132\032.google.protobuf.Timestamp\032-\n\013L" + + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001:\235\001\352A\231\001\n$privateca.googleapis.com/Cert" + + "ificate\022qprojects/{project}/locations/{l" + + "ocation}/certificateAuthorities/{certifi" + + "cate_authority}/certificates/{certificat" + + "e}B\024\n\022certificate_config\"\377\003\n\016ReusableCon" + + "fig\022\021\n\004name\030\001 \001(\tB\003\340A\003\022R\n\006values\030\002 \001(\0132=" + + ".google.cloud.security.privateca.v1beta1" + + ".ReusableConfigValuesB\003\340A\002\022\030\n\013descriptio" + + "n\030\003 \001(\tB\003\340A\001\0224\n\013create_time\030\004 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\0224\n\013update_tim" + + "e\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\022X\n\006labels\030\006 \003(\0132C.google.cloud.security" + + ".privateca.v1beta1.ReusableConfig.Labels" + + "EntryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001:w\352At\n\'privateca.google" + + "apis.com/ReusableConfig\022Iprojects/{proje" + + "ct}/locations/{location}/reusableConfigs" + + "/{reusable_config}\"\211\004\n\024ReusableConfigVal" + + "ues\022I\n\tkey_usage\030\001 \001(\01321.google.cloud.se" + + "curity.privateca.v1beta1.KeyUsageB\003\340A\001\022`" + + "\n\nca_options\030\002 \001(\0132G.google.cloud.securi" + + "ty.privateca.v1beta1.ReusableConfigValue" + + "s.CaOptionsB\003\340A\001\022J\n\npolicy_ids\030\003 \003(\01321.g" + + "oogle.cloud.security.privateca.v1beta1.O" + + "bjectIdB\003\340A\001\022\035\n\020aia_ocsp_servers\030\004 \003(\tB\003" + + "\340A\001\022Z\n\025additional_extensions\030\005 \003(\01326.goo" + + "gle.cloud.security.privateca.v1beta1.X50" + + "9ExtensionB\003\340A\001\032}\n\tCaOptions\022.\n\005is_ca\030\001 " + + "\001(\0132\032.google.protobuf.BoolValueB\003\340A\001\022@\n\026" + + "max_issuer_path_length\030\002 \001(\0132\033.google.pr" + + "otobuf.Int32ValueB\003\340A\001\"\256\001\n\025ReusableConfi" + + "gWrapper\022\036\n\017reusable_config\030\001 \001(\tB\003\340A\002H\000" + + "\022d\n\026reusable_config_values\030\002 \001(\0132=.googl" + + "e.cloud.security.privateca.v1beta1.Reusa" + + "bleConfigValuesB\003\340A\002H\000B\017\n\rconfig_values\"" + + "\374\001\n\021SubordinateConfig\022$\n\025certificate_aut" + + "hority\030\001 \001(\tB\003\340A\002H\000\022r\n\020pem_issuer_chain\030" + + "\002 \001(\0132Q.google.cloud.security.privateca." + + "v1beta1.SubordinateConfig.SubordinateCon" + + "figChainB\003\340A\002H\000\0327\n\026SubordinateConfigChai" + + "n\022\035\n\020pem_certificates\030\001 \003(\tB\003\340A\002B\024\n\022subo" + + "rdinate_config\"\262\001\n\tPublicKey\022M\n\004type\030\001 \001" + + "(\0162:.google.cloud.security.privateca.v1b" + + "eta1.PublicKey.KeyTypeB\003\340A\002\022\020\n\003key\030\002 \001(\014" + + "B\003\340A\002\"D\n\007KeyType\022\030\n\024KEY_TYPE_UNSPECIFIED" + + "\020\000\022\017\n\013PEM_RSA_KEY\020\001\022\016\n\nPEM_EC_KEY\020\002\"\362\003\n\021" + + "CertificateConfig\022e\n\016subject_config\030\001 \001(" + + "\0132H.google.cloud.security.privateca.v1be" + + "ta1.CertificateConfig.SubjectConfigB\003\340A\002" + + "\022\\\n\017reusable_config\030\002 \001(\0132>.google.cloud" + + ".security.privateca.v1beta1.ReusableConf" + + "igWrapperB\003\340A\002\022K\n\npublic_key\030\003 \001(\01322.goo" + + "gle.cloud.security.privateca.v1beta1.Pub" + + "licKeyB\003\340A\001\032\312\001\n\rSubjectConfig\022F\n\007subject" + + "\030\001 \001(\01320.google.cloud.security.privateca" + + ".v1beta1.SubjectB\003\340A\002\022\030\n\013common_name\030\002 \001" + + "(\tB\003\340A\001\022W\n\020subject_alt_name\030\003 \001(\01328.goog" + + "le.cloud.security.privateca.v1beta1.Subj" + + "ectAltNamesB\003\340A\001\"\341\010\n\026CertificateDescript" + + "ion\022o\n\023subject_description\030\001 \001(\0132R.googl" + + "e.cloud.security.privateca.v1beta1.Certi" + + "ficateDescription.SubjectDescription\022T\n\r" + + "config_values\030\002 \001(\0132=.google.cloud.secur" + + "ity.privateca.v1beta1.ReusableConfigValu" + + "es\022F\n\npublic_key\030\003 \001(\01322.google.cloud.se" + + "curity.privateca.v1beta1.PublicKey\022]\n\016su" + + "bject_key_id\030\004 \001(\0132E.google.cloud.securi" + + "ty.privateca.v1beta1.CertificateDescript" + + "ion.KeyId\022_\n\020authority_key_id\030\005 \001(\0132E.go" + + "ogle.cloud.security.privateca.v1beta1.Ce" + + "rtificateDescription.KeyId\022\037\n\027crl_distri" + + "bution_points\030\006 \003(\t\022$\n\034aia_issuing_certi" + + "ficate_urls\030\007 \003(\t\022p\n\020cert_fingerprint\030\010 " + + "\001(\0132V.google.cloud.security.privateca.v1" + + "beta1.CertificateDescription.Certificate" + + "Fingerprint\032\361\002\n\022SubjectDescription\022A\n\007su" + + "bject\030\001 \001(\01320.google.cloud.security.priv" + + "ateca.v1beta1.Subject\022\023\n\013common_name\030\002 \001" + + "(\t\022R\n\020subject_alt_name\030\003 \001(\01328.google.cl" + + "oud.security.privateca.v1beta1.SubjectAl" + + "tNames\022\031\n\021hex_serial_number\030\004 \001(\t\022+\n\010lif" + + "etime\030\005 \001(\0132\031.google.protobuf.Duration\0223" + + "\n\017not_before_time\030\006 \001(\0132\032.google.protobu" + + "f.Timestamp\0222\n\016not_after_time\030\007 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\032\034\n\005KeyId\022\023\n\006key_" + + "id\030\001 \001(\tB\003\340A\001\032-\n\026CertificateFingerprint\022" + + "\023\n\013sha256_hash\030\001 \001(\t\"\'\n\010ObjectId\022\033\n\016obje" + + "ct_id_path\030\001 \003(\005B\003\340A\002\"\205\001\n\rX509Extension\022" + + "I\n\tobject_id\030\001 \001(\01321.google.cloud.securi" + + "ty.privateca.v1beta1.ObjectIdB\003\340A\002\022\025\n\010cr" + + "itical\030\002 \001(\010B\003\340A\002\022\022\n\005value\030\003 \001(\014B\003\340A\002\"\261\005" + + "\n\010KeyUsage\022Y\n\016base_key_usage\030\001 \001(\0132A.goo" + + "gle.cloud.security.privateca.v1beta1.Key" + + "Usage.KeyUsageOptions\022e\n\022extended_key_us" + + "age\030\002 \001(\0132I.google.cloud.security.privat" + + "eca.v1beta1.KeyUsage.ExtendedKeyUsageOpt" + + "ions\022V\n\033unknown_extended_key_usages\030\003 \003(" + + "\01321.google.cloud.security.privateca.v1be" + + "ta1.ObjectId\032\347\001\n\017KeyUsageOptions\022\031\n\021digi" + + "tal_signature\030\001 \001(\010\022\032\n\022content_commitmen" + + "t\030\002 \001(\010\022\030\n\020key_encipherment\030\003 \001(\010\022\031\n\021dat" + + "a_encipherment\030\004 \001(\010\022\025\n\rkey_agreement\030\005 " + + "\001(\010\022\021\n\tcert_sign\030\006 \001(\010\022\020\n\010crl_sign\030\007 \001(\010" + + "\022\025\n\rencipher_only\030\010 \001(\010\022\025\n\rdecipher_only" + + "\030\t \001(\010\032\240\001\n\027ExtendedKeyUsageOptions\022\023\n\013se" + + "rver_auth\030\001 \001(\010\022\023\n\013client_auth\030\002 \001(\010\022\024\n\014" + + "code_signing\030\003 \001(\010\022\030\n\020email_protection\030\004" + + " \001(\010\022\025\n\rtime_stamping\030\005 \001(\010\022\024\n\014ocsp_sign" + + "ing\030\006 \001(\010\"\243\001\n\007Subject\022\024\n\014country_code\030\001 " + + "\001(\t\022\024\n\014organization\030\002 \001(\t\022\033\n\023organizatio" + + "nal_unit\030\003 \001(\t\022\020\n\010locality\030\004 \001(\t\022\020\n\010prov" + + "ince\030\005 \001(\t\022\026\n\016street_address\030\006 \001(\t\022\023\n\013po" + + "stal_code\030\007 \001(\t\"\256\001\n\017SubjectAltNames\022\021\n\td" + + "ns_names\030\001 \003(\t\022\014\n\004uris\030\002 \003(\t\022\027\n\017email_ad" + + "dresses\030\003 \003(\t\022\024\n\014ip_addresses\030\004 \003(\t\022K\n\013c" + + "ustom_sans\030\005 \003(\01326.google.cloud.security" + + ".privateca.v1beta1.X509Extension*\207\002\n\020Rev" + + "ocationReason\022!\n\035REVOCATION_REASON_UNSPE" + + "CIFIED\020\000\022\022\n\016KEY_COMPROMISE\020\001\022$\n CERTIFIC" + + "ATE_AUTHORITY_COMPROMISE\020\002\022\027\n\023AFFILIATIO" + + "N_CHANGED\020\003\022\016\n\nSUPERSEDED\020\004\022\032\n\026CESSATION" + + "_OF_OPERATION\020\005\022\024\n\020CERTIFICATE_HOLD\020\006\022\027\n" + + "\023PRIVILEGE_WITHDRAWN\020\007\022\"\n\036ATTRIBUTE_AUTH" + + "ORITY_COMPROMISE\020\010B\307\001\n+com.google.cloud." + + "security.privateca.v1beta1B\027PrivateCaRes" + + "ourcesProtoP\001ZPgoogle.golang.org/genprot" + + "o/googleapis/cloud/security/privateca/v1" + + "beta1;privateca\370\001\001\252\002\'Google.Cloud.Securi" + + "ty.PrivateCA.V1Beta1b\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.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_descriptor, + new java.lang.String[] { + "Name", + "Type", + "Tier", + "Config", + "Lifetime", + "KeySpec", + "CertificatePolicy", + "IssuingOptions", + "SubordinateConfig", + "State", + "PemCaCertificates", + "CaCertificateDescriptions", + "GcsBucket", + "AccessUrls", + "CreateTime", + "UpdateTime", + "DeleteTime", + "Labels", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_IssuingOptions_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_IssuingOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_IssuingOptions_descriptor, + new java.lang.String[] { + "IncludeCaCertUrl", "IncludeCrlAccessUrl", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_descriptor, + new java.lang.String[] { + "AllowedConfigList", + "OverwriteConfigValues", + "AllowedLocationsAndOrganizations", + "AllowedCommonNames", + "AllowedSans", + "MaximumLifetime", + "AllowedIssuanceModes", + "ConfigPolicy", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedConfigList_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedConfigList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedConfigList_descriptor, + new java.lang.String[] { + "AllowedConfigValues", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedSubjectAltNames_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedSubjectAltNames_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_AllowedSubjectAltNames_descriptor, + new java.lang.String[] { + "AllowedDnsNames", + "AllowedUris", + "AllowedEmailAddresses", + "AllowedIps", + "AllowGlobbingDnsWildcards", + "AllowCustomSans", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_IssuanceModes_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_IssuanceModes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_CertificateAuthorityPolicy_IssuanceModes_descriptor, + new java.lang.String[] { + "AllowCsrBasedIssuance", "AllowConfigBasedIssuance", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_AccessUrls_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_AccessUrls_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_AccessUrls_descriptor, + new java.lang.String[] { + "CaCertificateAccessUrl", "CrlAccessUrl", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_KeyVersionSpec_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_KeyVersionSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_KeyVersionSpec_descriptor, + new java.lang.String[] { + "CloudKmsKeyVersion", "Algorithm", "KeyVersion", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_LabelsEntry_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateAuthority_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_descriptor, + new java.lang.String[] { + "Name", + "SequenceNumber", + "RevokedCertificates", + "PemCrl", + "AccessUrl", + "State", + "CreateTime", + "UpdateTime", + "Labels", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_RevokedCertificate_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_RevokedCertificate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_RevokedCertificate_descriptor, + new java.lang.String[] { + "Certificate", "HexSerialNumber", "RevocationReason", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_LabelsEntry_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateRevocationList_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_security_privateca_v1beta1_Certificate_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_security_privateca_v1beta1_Certificate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_Certificate_descriptor, + new java.lang.String[] { + "Name", + "PemCsr", + "Config", + "Lifetime", + "RevocationDetails", + "PemCertificate", + "CertificateDescription", + "PemCertificateChain", + "CreateTime", + "UpdateTime", + "Labels", + "CertificateConfig", + }); + internal_static_google_cloud_security_privateca_v1beta1_Certificate_RevocationDetails_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_Certificate_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_security_privateca_v1beta1_Certificate_RevocationDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_Certificate_RevocationDetails_descriptor, + new java.lang.String[] { + "RevocationState", "RevocationTime", + }); + internal_static_google_cloud_security_privateca_v1beta1_Certificate_LabelsEntry_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_Certificate_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_security_privateca_v1beta1_Certificate_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_Certificate_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_descriptor, + new java.lang.String[] { + "Name", "Values", "Description", "CreateTime", "UpdateTime", "Labels", + }); + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_LabelsEntry_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_descriptor, + new java.lang.String[] { + "KeyUsage", "CaOptions", "PolicyIds", "AiaOcspServers", "AdditionalExtensions", + }); + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_CaOptions_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_CaOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_CaOptions_descriptor, + new java.lang.String[] { + "IsCa", "MaxIssuerPathLength", + }); + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigWrapper_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigWrapper_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigWrapper_descriptor, + new java.lang.String[] { + "ReusableConfig", "ReusableConfigValues", "ConfigValues", + }); + internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_descriptor, + new java.lang.String[] { + "CertificateAuthority", "PemIssuerChain", "SubordinateConfig", + }); + internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_SubordinateConfigChain_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_SubordinateConfigChain_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_SubordinateConfigChain_descriptor, + new java.lang.String[] { + "PemCertificates", + }); + internal_static_google_cloud_security_privateca_v1beta1_PublicKey_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_security_privateca_v1beta1_PublicKey_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_PublicKey_descriptor, + new java.lang.String[] { + "Type", "Key", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_descriptor, + new java.lang.String[] { + "SubjectConfig", "ReusableConfig", "PublicKey", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_SubjectConfig_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_SubjectConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateConfig_SubjectConfig_descriptor, + new java.lang.String[] { + "Subject", "CommonName", "SubjectAltName", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_descriptor, + new java.lang.String[] { + "SubjectDescription", + "ConfigValues", + "PublicKey", + "SubjectKeyId", + "AuthorityKeyId", + "CrlDistributionPoints", + "AiaIssuingCertificateUrls", + "CertFingerprint", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_SubjectDescription_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_SubjectDescription_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_SubjectDescription_descriptor, + new java.lang.String[] { + "Subject", + "CommonName", + "SubjectAltName", + "HexSerialNumber", + "Lifetime", + "NotBeforeTime", + "NotAfterTime", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_KeyId_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_KeyId_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_KeyId_descriptor, + new java.lang.String[] { + "KeyId", + }); + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_CertificateFingerprint_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_CertificateFingerprint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_CertificateDescription_CertificateFingerprint_descriptor, + new java.lang.String[] { + "Sha256Hash", + }); + internal_static_google_cloud_security_privateca_v1beta1_ObjectId_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_security_privateca_v1beta1_ObjectId_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_ObjectId_descriptor, + new java.lang.String[] { + "ObjectIdPath", + }); + internal_static_google_cloud_security_privateca_v1beta1_X509Extension_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_security_privateca_v1beta1_X509Extension_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_X509Extension_descriptor, + new java.lang.String[] { + "ObjectId", "Critical", "Value", + }); + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_descriptor, + new java.lang.String[] { + "BaseKeyUsage", "ExtendedKeyUsage", "UnknownExtendedKeyUsages", + }); + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_KeyUsageOptions_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_KeyUsageOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_KeyUsageOptions_descriptor, + new java.lang.String[] { + "DigitalSignature", + "ContentCommitment", + "KeyEncipherment", + "DataEncipherment", + "KeyAgreement", + "CertSign", + "CrlSign", + "EncipherOnly", + "DecipherOnly", + }); + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_ExtendedKeyUsageOptions_descriptor = + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_ExtendedKeyUsageOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_KeyUsage_ExtendedKeyUsageOptions_descriptor, + new java.lang.String[] { + "ServerAuth", + "ClientAuth", + "CodeSigning", + "EmailProtection", + "TimeStamping", + "OcspSigning", + }); + internal_static_google_cloud_security_privateca_v1beta1_Subject_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_security_privateca_v1beta1_Subject_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_Subject_descriptor, + new java.lang.String[] { + "CountryCode", + "Organization", + "OrganizationalUnit", + "Locality", + "Province", + "StreetAddress", + "PostalCode", + }); + internal_static_google_cloud_security_privateca_v1beta1_SubjectAltNames_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_security_privateca_v1beta1_SubjectAltNames_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_security_privateca_v1beta1_SubjectAltNames_descriptor, + new java.lang.String[] { + "DnsNames", "Uris", "EmailAddresses", "IpAddresses", "CustomSans", + }); + 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.protobuf.DurationProto.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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PublicKey.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PublicKey.java new file mode 100644 index 00000000..07f537d0 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PublicKey.java @@ -0,0 +1,889 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * A [PublicKey][google.cloud.security.privateca.v1beta1.PublicKey] describes a public key.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.PublicKey} + */ +public final class PublicKey extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.PublicKey) + PublicKeyOrBuilder { + private static final long serialVersionUID = 0L; + // Use PublicKey.newBuilder() to construct. + private PublicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PublicKey() { + type_ = 0; + key_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PublicKey(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PublicKey( + 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(); + + type_ = rawValue; + break; + } + case 18: + { + key_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_PublicKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_PublicKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.PublicKey.class, + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder.class); + } + + /** + * + * + *
+   * Types of public keys that are supported.
+   * At a minimum, we support RSA and ECDSA, for the key sizes or curves listed:
+   * https://cloud.google.com/kms/docs/algorithms#asymmetric_signing_algorithms
+   * 
+ * + * Protobuf enum {@code google.cloud.security.privateca.v1beta1.PublicKey.KeyType} + */ + public enum KeyType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default unspecified value.
+     * 
+ * + * KEY_TYPE_UNSPECIFIED = 0; + */ + KEY_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A PEM-encoded PKCS#1/RFC 3447 RSAPrivateKey structure.
+     * 
+ * + * PEM_RSA_KEY = 1; + */ + PEM_RSA_KEY(1), + /** + * + * + *
+     * A PEM-encoded compressed NIST P-256/secp256r1/prime256v1 or P-384 key.
+     * 
+ * + * PEM_EC_KEY = 2; + */ + PEM_EC_KEY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default unspecified value.
+     * 
+ * + * KEY_TYPE_UNSPECIFIED = 0; + */ + public static final int KEY_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A PEM-encoded PKCS#1/RFC 3447 RSAPrivateKey structure.
+     * 
+ * + * PEM_RSA_KEY = 1; + */ + public static final int PEM_RSA_KEY_VALUE = 1; + /** + * + * + *
+     * A PEM-encoded compressed NIST P-256/secp256r1/prime256v1 or P-384 key.
+     * 
+ * + * PEM_EC_KEY = 2; + */ + public static final int PEM_EC_KEY_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 KeyType 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 KeyType forNumber(int value) { + switch (value) { + case 0: + return KEY_TYPE_UNSPECIFIED; + case 1: + return PEM_RSA_KEY; + case 2: + return PEM_EC_KEY; + 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 KeyType findValueByNumber(int number) { + return KeyType.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.security.privateca.v1beta1.PublicKey.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final KeyType[] VALUES = values(); + + public static KeyType 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 KeyType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1beta1.PublicKey.KeyType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+   * Required. The type of public key.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey.KeyType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. The type of public key.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey.KeyType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType result = + com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType.valueOf(type_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType.UNRECOGNIZED + : result; + } + + public static final int KEY_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString key_; + /** + * + * + *
+   * Required. A public key. Padding and encoding varies by 'KeyType' and is described
+   * along with the KeyType values.
+   * 
+ * + * bytes key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType.KEY_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (!key_.isEmpty()) { + output.writeBytes(2, key_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType.KEY_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (!key_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, key_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.PublicKey)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.PublicKey other = + (com.google.cloud.security.privateca.v1beta1.PublicKey) obj; + + if (type_ != other.type_) return false; + if (!getKey().equals(other.getKey())) return false; + if (!unknownFields.equals(other.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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.PublicKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [PublicKey][google.cloud.security.privateca.v1beta1.PublicKey] describes a public key.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.PublicKey} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.PublicKey) + com.google.cloud.security.privateca.v1beta1.PublicKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_PublicKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_PublicKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.PublicKey.class, + com.google.cloud.security.privateca.v1beta1.PublicKey.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.PublicKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + key_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_PublicKey_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.PublicKey getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.PublicKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.PublicKey build() { + com.google.cloud.security.privateca.v1beta1.PublicKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.PublicKey buildPartial() { + com.google.cloud.security.privateca.v1beta1.PublicKey result = + new com.google.cloud.security.privateca.v1beta1.PublicKey(this); + result.type_ = type_; + result.key_ = key_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.PublicKey) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.PublicKey) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.security.privateca.v1beta1.PublicKey other) { + if (other == com.google.cloud.security.privateca.v1beta1.PublicKey.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getKey() != com.google.protobuf.ByteString.EMPTY) { + setKey(other.getKey()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.PublicKey parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.PublicKey) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Required. The type of public key.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey.KeyType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. The type of public key.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey.KeyType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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; + } + /** + * + * + *
+     * Required. The type of public key.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey.KeyType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType result = + com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType.valueOf(type_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The type of public key.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey.KeyType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of public key.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey.KeyType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * Required. A public key. Padding and encoding varies by 'KeyType' and is described
+     * along with the KeyType values.
+     * 
+ * + * bytes key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + * + * + *
+     * Required. A public key. Padding and encoding varies by 'KeyType' and is described
+     * along with the KeyType values.
+     * 
+ * + * bytes key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A public key. Padding and encoding varies by 'KeyType' and is described
+     * along with the KeyType values.
+     * 
+ * + * bytes key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + 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.security.privateca.v1beta1.PublicKey) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.PublicKey) + private static final com.google.cloud.security.privateca.v1beta1.PublicKey DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.PublicKey(); + } + + public static com.google.cloud.security.privateca.v1beta1.PublicKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublicKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PublicKey(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.PublicKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PublicKeyOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PublicKeyOrBuilder.java new file mode 100644 index 00000000..613e66ba --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/PublicKeyOrBuilder.java @@ -0,0 +1,68 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface PublicKeyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.PublicKey) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The type of public key.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey.KeyType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. The type of public key.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.PublicKey.KeyType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.security.privateca.v1beta1.PublicKey.KeyType getType(); + + /** + * + * + *
+   * Required. A public key. Padding and encoding varies by 'KeyType' and is described
+   * along with the KeyType values.
+   * 
+ * + * bytes key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + com.google.protobuf.ByteString getKey(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RestoreCertificateAuthorityRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RestoreCertificateAuthorityRequest.java new file mode 100644 index 00000000..0f4a4769 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RestoreCertificateAuthorityRequest.java @@ -0,0 +1,938 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.RestoreCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest} + */ +public final class RestoreCertificateAuthorityRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest) + RestoreCertificateAuthorityRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RestoreCertificateAuthorityRequest.newBuilder() to construct. + private RestoreCertificateAuthorityRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RestoreCertificateAuthorityRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RestoreCertificateAuthorityRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RestoreCertificateAuthorityRequest( + 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(); + + 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_RestoreCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_RestoreCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.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, 2, 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(2, 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.security.privateca.v1beta1.RestoreCertificateAuthorityRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest other = + (com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest) 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.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.RestoreCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest) + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_RestoreCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_RestoreCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_RestoreCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest build() { + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest result = + new com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest(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.security.privateca.v1beta1.RestoreCertificateAuthorityRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + .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.security.privateca.v1beta1.RestoreCertificateAuthorityRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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.security.privateca.v1beta1.RestoreCertificateAuthorityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest) + private static final com.google.cloud.security.privateca.v1beta1 + .RestoreCertificateAuthorityRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreCertificateAuthorityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RestoreCertificateAuthorityRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RestoreCertificateAuthorityRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RestoreCertificateAuthorityRequestOrBuilder.java new file mode 100644 index 00000000..c9a42fd5 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RestoreCertificateAuthorityRequestOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface RestoreCertificateAuthorityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfig.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfig.java new file mode 100644 index 00000000..897a5760 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfig.java @@ -0,0 +1,2055 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] refers to a managed [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues]. Those, in
+ * turn, are used to describe certain fields of an X.509 certificate, such as
+ * the key usage fields, fields specific to CA certificates, certificate policy
+ * extensions and custom extensions.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ReusableConfig} + */ +public final class ReusableConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ReusableConfig) + ReusableConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReusableConfig.newBuilder() to construct. + private ReusableConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReusableConfig() { + name_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReusableConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReusableConfig( + 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.security.privateca.v1beta1.ReusableConfigValues.Builder subBuilder = + null; + if (values_ != null) { + subBuilder = values_.toBuilder(); + } + values_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(values_); + values_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ReusableConfig.class, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * 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 VALUES_FIELD_NUMBER = 2; + private com.google.cloud.security.privateca.v1beta1.ReusableConfigValues values_; + /** + * + * + *
+   * Required. The config values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the values field is set. + */ + @java.lang.Override + public boolean hasValues() { + return values_ != null; + } + /** + * + * + *
+   * Required. The config values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The values. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues getValues() { + return values_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.getDefaultInstance() + : values_; + } + /** + * + * + *
+   * Required. The config values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder + getValuesOrBuilder() { + return getValues(); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. A human-readable description of scenarios these ReusableConfigValues may be
+   * compatible with.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A human-readable description of scenarios these ReusableConfigValues may be
+   * compatible with.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LABELS_FIELD_NUMBER = 6; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (values_ != null) { + output.writeMessage(2, getValues()); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (values_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValues()); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, labels__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.ReusableConfig)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ReusableConfig other = + (com.google.cloud.security.privateca.v1beta1.ReusableConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (hasValues() != other.hasValues()) return false; + if (hasValues()) { + if (!getValues().equals(other.getValues())) return false; + } + if (!getDescription().equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasValues()) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValues().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ReusableConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] refers to a managed [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues]. Those, in
+   * turn, are used to describe certain fields of an X.509 certificate, such as
+   * the key usage fields, fields specific to CA certificates, certificate policy
+   * extensions and custom extensions.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ReusableConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ReusableConfig) + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 6: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ReusableConfig.class, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.ReusableConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (valuesBuilder_ == null) { + values_ = null; + } else { + values_ = null; + valuesBuilder_ = null; + } + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfig getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ReusableConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfig build() { + com.google.cloud.security.privateca.v1beta1.ReusableConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfig buildPartial() { + com.google.cloud.security.privateca.v1beta1.ReusableConfig result = + new com.google.cloud.security.privateca.v1beta1.ReusableConfig(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (valuesBuilder_ == null) { + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.ReusableConfig) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.ReusableConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.security.privateca.v1beta1.ReusableConfig other) { + if (other == com.google.cloud.security.privateca.v1beta1.ReusableConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasValues()) { + mergeValues(other.getValues()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.ReusableConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ReusableConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * 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.cloud.security.privateca.v1beta1.ReusableConfigValues values_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder> + valuesBuilder_; + /** + * + * + *
+     * Required. The config values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the values field is set. + */ + public boolean hasValues() { + return valuesBuilder_ != null || values_ != null; + } + /** + * + * + *
+     * Required. The config values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The values. + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues getValues() { + if (valuesBuilder_ == null) { + return values_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.getDefaultInstance() + : values_; + } else { + return valuesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The config values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + values_ = value; + onChanged(); + } else { + valuesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The config values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder builderForValue) { + if (valuesBuilder_ == null) { + values_ = builderForValue.build(); + onChanged(); + } else { + valuesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The config values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues value) { + if (valuesBuilder_ == null) { + if (values_ != null) { + values_ = + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.newBuilder(values_) + .mergeFrom(value) + .buildPartial(); + } else { + values_ = value; + } + onChanged(); + } else { + valuesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The config values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = null; + onChanged(); + } else { + values_ = null; + valuesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The config values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder + getValuesBuilder() { + + onChanged(); + return getValuesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The config values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder + getValuesOrBuilder() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilder(); + } else { + return values_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.getDefaultInstance() + : values_; + } + } + /** + * + * + *
+     * Required. The config values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder>( + getValues(), getParentForChildren(), isClean()); + values_ = null; + } + return valuesBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. A human-readable description of scenarios these ReusableConfigValues may be
+     * compatible with.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A human-readable description of scenarios these ReusableConfigValues may be
+     * compatible with.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A human-readable description of scenarios these ReusableConfigValues may be
+     * compatible with.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human-readable description of scenarios these ReusableConfigValues may be
+     * compatible with.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human-readable description of scenarios these ReusableConfigValues may be
+     * compatible with.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Labels with user-defined metadata.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ReusableConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ReusableConfig) + private static final com.google.cloud.security.privateca.v1beta1.ReusableConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.ReusableConfig(); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReusableConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReusableConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigName.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigName.java new file mode 100644 index 00000000..d7f02e1f --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigName.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. + */ + +package com.google.cloud.security.privateca.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class ReusableConfigName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/reusableConfigs/{reusable_config}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String reusableConfig; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getReusableConfig() { + return reusableConfig; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private ReusableConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + reusableConfig = Preconditions.checkNotNull(builder.getReusableConfig()); + } + + public static ReusableConfigName of(String project, String location, String reusableConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setReusableConfig(reusableConfig) + .build(); + } + + public static String format(String project, String location, String reusableConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setReusableConfig(reusableConfig) + .build() + .toString(); + } + + public static ReusableConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "ReusableConfigName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("reusable_config")); + } + + 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 (ReusableConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("reusableConfig", reusableConfig); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "location", location, "reusable_config", reusableConfig); + } + + /** Builder for ReusableConfigName. */ + public static class Builder { + + private String project; + private String location; + private String reusableConfig; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getReusableConfig() { + return reusableConfig; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setReusableConfig(String reusableConfig) { + this.reusableConfig = reusableConfig; + return this; + } + + private Builder() {} + + private Builder(ReusableConfigName reusableConfigName) { + project = reusableConfigName.project; + location = reusableConfigName.location; + reusableConfig = reusableConfigName.reusableConfig; + } + + public ReusableConfigName build() { + return new ReusableConfigName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ReusableConfigName) { + ReusableConfigName that = (ReusableConfigName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.reusableConfig.equals(that.reusableConfig)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= reusableConfig.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigOrBuilder.java new file mode 100644 index 00000000..1d4932fc --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigOrBuilder.java @@ -0,0 +1,250 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ReusableConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ReusableConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The config values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the values field is set. + */ + boolean hasValues(); + /** + * + * + *
+   * Required. The config values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The values. + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues getValues(); + /** + * + * + *
+   * Required. The config values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder getValuesOrBuilder(); + + /** + * + * + *
+   * Optional. A human-readable description of scenarios these ReusableConfigValues may be
+   * compatible with.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. A human-readable description of scenarios these ReusableConfigValues may be
+   * compatible with.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels with user-defined metadata.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigValues.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigValues.java new file mode 100644 index 00000000..8d6c55ad --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigValues.java @@ -0,0 +1,3755 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * A [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] is used to describe certain fields of an
+ * X.509 certificate, such as the key usage fields, fields specific to CA
+ * certificates, certificate policy extensions and custom extensions.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ReusableConfigValues} + */ +public final class ReusableConfigValues extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ReusableConfigValues) + ReusableConfigValuesOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReusableConfigValues.newBuilder() to construct. + private ReusableConfigValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReusableConfigValues() { + policyIds_ = java.util.Collections.emptyList(); + aiaOcspServers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + additionalExtensions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReusableConfigValues(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReusableConfigValues( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.security.privateca.v1beta1.KeyUsage.Builder subBuilder = null; + if (keyUsage_ != null) { + subBuilder = keyUsage_.toBuilder(); + } + keyUsage_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.KeyUsage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(keyUsage_); + keyUsage_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.Builder + subBuilder = null; + if (caOptions_ != null) { + subBuilder = caOptions_.toBuilder(); + } + caOptions_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(caOptions_); + caOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + policyIds_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + policyIds_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ObjectId.parser(), + extensionRegistry)); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + aiaOcspServers_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + aiaOcspServers_.add(s); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + additionalExtensions_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.X509Extension>(); + mutable_bitField0_ |= 0x00000004; + } + additionalExtensions_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.X509Extension.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)) { + policyIds_ = java.util.Collections.unmodifiableList(policyIds_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + aiaOcspServers_ = aiaOcspServers_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + additionalExtensions_ = java.util.Collections.unmodifiableList(additionalExtensions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.class, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder.class); + } + + public interface CaOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+     * value is missing, the extension will be omitted from the CA certificate.
+     * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the isCa field is set. + */ + boolean hasIsCa(); + /** + * + * + *
+     * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+     * value is missing, the extension will be omitted from the CA certificate.
+     * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isCa. + */ + com.google.protobuf.BoolValue getIsCa(); + /** + * + * + *
+     * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+     * value is missing, the extension will be omitted from the CA certificate.
+     * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.BoolValueOrBuilder getIsCaOrBuilder(); + + /** + * + * + *
+     * Optional. Refers to the path length restriction X.509 extension. For a CA
+     * certificate, this value describes the depth of subordinate CA
+     * certificates that are allowed.
+     * If this value is less than 0, the request will fail.
+     * If this value is missing, the max path length will be omitted from the
+     * CA certificate.
+     * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the maxIssuerPathLength field is set. + */ + boolean hasMaxIssuerPathLength(); + /** + * + * + *
+     * Optional. Refers to the path length restriction X.509 extension. For a CA
+     * certificate, this value describes the depth of subordinate CA
+     * certificates that are allowed.
+     * If this value is less than 0, the request will fail.
+     * If this value is missing, the max path length will be omitted from the
+     * CA certificate.
+     * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maxIssuerPathLength. + */ + com.google.protobuf.Int32Value getMaxIssuerPathLength(); + /** + * + * + *
+     * Optional. Refers to the path length restriction X.509 extension. For a CA
+     * certificate, this value describes the depth of subordinate CA
+     * certificates that are allowed.
+     * If this value is less than 0, the request will fail.
+     * If this value is missing, the max path length will be omitted from the
+     * CA certificate.
+     * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Int32ValueOrBuilder getMaxIssuerPathLengthOrBuilder(); + } + /** + * + * + *
+   * Describes values that are relevant in a CA certificate.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions} + */ + public static final class CaOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions) + CaOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CaOptions.newBuilder() to construct. + private CaOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CaOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CaOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CaOptions( + 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.BoolValue.Builder subBuilder = null; + if (isCa_ != null) { + subBuilder = isCa_.toBuilder(); + } + isCa_ = + input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(isCa_); + isCa_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Int32Value.Builder subBuilder = null; + if (maxIssuerPathLength_ != null) { + subBuilder = maxIssuerPathLength_.toBuilder(); + } + maxIssuerPathLength_ = + input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxIssuerPathLength_); + maxIssuerPathLength_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_CaOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_CaOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.class, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.Builder + .class); + } + + public static final int IS_CA_FIELD_NUMBER = 1; + private com.google.protobuf.BoolValue isCa_; + /** + * + * + *
+     * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+     * value is missing, the extension will be omitted from the CA certificate.
+     * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the isCa field is set. + */ + @java.lang.Override + public boolean hasIsCa() { + return isCa_ != null; + } + /** + * + * + *
+     * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+     * value is missing, the extension will be omitted from the CA certificate.
+     * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isCa. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getIsCa() { + return isCa_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : isCa_; + } + /** + * + * + *
+     * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+     * value is missing, the extension will be omitted from the CA certificate.
+     * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getIsCaOrBuilder() { + return getIsCa(); + } + + public static final int MAX_ISSUER_PATH_LENGTH_FIELD_NUMBER = 2; + private com.google.protobuf.Int32Value maxIssuerPathLength_; + /** + * + * + *
+     * Optional. Refers to the path length restriction X.509 extension. For a CA
+     * certificate, this value describes the depth of subordinate CA
+     * certificates that are allowed.
+     * If this value is less than 0, the request will fail.
+     * If this value is missing, the max path length will be omitted from the
+     * CA certificate.
+     * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the maxIssuerPathLength field is set. + */ + @java.lang.Override + public boolean hasMaxIssuerPathLength() { + return maxIssuerPathLength_ != null; + } + /** + * + * + *
+     * Optional. Refers to the path length restriction X.509 extension. For a CA
+     * certificate, this value describes the depth of subordinate CA
+     * certificates that are allowed.
+     * If this value is less than 0, the request will fail.
+     * If this value is missing, the max path length will be omitted from the
+     * CA certificate.
+     * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maxIssuerPathLength. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getMaxIssuerPathLength() { + return maxIssuerPathLength_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxIssuerPathLength_; + } + /** + * + * + *
+     * Optional. Refers to the path length restriction X.509 extension. For a CA
+     * certificate, this value describes the depth of subordinate CA
+     * certificates that are allowed.
+     * If this value is less than 0, the request will fail.
+     * If this value is missing, the max path length will be omitted from the
+     * CA certificate.
+     * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getMaxIssuerPathLengthOrBuilder() { + return getMaxIssuerPathLength(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (isCa_ != null) { + output.writeMessage(1, getIsCa()); + } + if (maxIssuerPathLength_ != null) { + output.writeMessage(2, getMaxIssuerPathLength()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (isCa_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIsCa()); + } + if (maxIssuerPathLength_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMaxIssuerPathLength()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions other = + (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions) obj; + + if (hasIsCa() != other.hasIsCa()) return false; + if (hasIsCa()) { + if (!getIsCa().equals(other.getIsCa())) return false; + } + if (hasMaxIssuerPathLength() != other.hasMaxIssuerPathLength()) return false; + if (hasMaxIssuerPathLength()) { + if (!getMaxIssuerPathLength().equals(other.getMaxIssuerPathLength())) return false; + } + if (!unknownFields.equals(other.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 (hasIsCa()) { + hash = (37 * hash) + IS_CA_FIELD_NUMBER; + hash = (53 * hash) + getIsCa().hashCode(); + } + if (hasMaxIssuerPathLength()) { + hash = (37 * hash) + MAX_ISSUER_PATH_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getMaxIssuerPathLength().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Describes values that are relevant in a CA certificate.
+     * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions) + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_CaOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_CaOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.class, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (isCaBuilder_ == null) { + isCa_ = null; + } else { + isCa_ = null; + isCaBuilder_ = null; + } + if (maxIssuerPathLengthBuilder_ == null) { + maxIssuerPathLength_ = null; + } else { + maxIssuerPathLength_ = null; + maxIssuerPathLengthBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_CaOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions build() { + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + buildPartial() { + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions result = + new com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions(this); + if (isCaBuilder_ == null) { + result.isCa_ = isCa_; + } else { + result.isCa_ = isCaBuilder_.build(); + } + if (maxIssuerPathLengthBuilder_ == null) { + result.maxIssuerPathLength_ = maxIssuerPathLength_; + } else { + result.maxIssuerPathLength_ = maxIssuerPathLengthBuilder_.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.security.privateca.v1beta1.ReusableConfigValues.CaOptions) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + .getDefaultInstance()) return this; + if (other.hasIsCa()) { + mergeIsCa(other.getIsCa()); + } + if (other.hasMaxIssuerPathLength()) { + mergeMaxIssuerPathLength(other.getMaxIssuerPathLength()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.BoolValue isCa_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + isCaBuilder_; + /** + * + * + *
+       * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+       * value is missing, the extension will be omitted from the CA certificate.
+       * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the isCa field is set. + */ + public boolean hasIsCa() { + return isCaBuilder_ != null || isCa_ != null; + } + /** + * + * + *
+       * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+       * value is missing, the extension will be omitted from the CA certificate.
+       * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The isCa. + */ + public com.google.protobuf.BoolValue getIsCa() { + if (isCaBuilder_ == null) { + return isCa_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : isCa_; + } else { + return isCaBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+       * value is missing, the extension will be omitted from the CA certificate.
+       * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIsCa(com.google.protobuf.BoolValue value) { + if (isCaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + isCa_ = value; + onChanged(); + } else { + isCaBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+       * value is missing, the extension will be omitted from the CA certificate.
+       * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIsCa(com.google.protobuf.BoolValue.Builder builderForValue) { + if (isCaBuilder_ == null) { + isCa_ = builderForValue.build(); + onChanged(); + } else { + isCaBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+       * value is missing, the extension will be omitted from the CA certificate.
+       * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeIsCa(com.google.protobuf.BoolValue value) { + if (isCaBuilder_ == null) { + if (isCa_ != null) { + isCa_ = com.google.protobuf.BoolValue.newBuilder(isCa_).mergeFrom(value).buildPartial(); + } else { + isCa_ = value; + } + onChanged(); + } else { + isCaBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+       * value is missing, the extension will be omitted from the CA certificate.
+       * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIsCa() { + if (isCaBuilder_ == null) { + isCa_ = null; + onChanged(); + } else { + isCa_ = null; + isCaBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+       * value is missing, the extension will be omitted from the CA certificate.
+       * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.BoolValue.Builder getIsCaBuilder() { + + onChanged(); + return getIsCaFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+       * value is missing, the extension will be omitted from the CA certificate.
+       * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.BoolValueOrBuilder getIsCaOrBuilder() { + if (isCaBuilder_ != null) { + return isCaBuilder_.getMessageOrBuilder(); + } else { + return isCa_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : isCa_; + } + } + /** + * + * + *
+       * Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
+       * value is missing, the extension will be omitted from the CA certificate.
+       * 
+ * + * .google.protobuf.BoolValue is_ca = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + getIsCaFieldBuilder() { + if (isCaBuilder_ == null) { + isCaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder>( + getIsCa(), getParentForChildren(), isClean()); + isCa_ = null; + } + return isCaBuilder_; + } + + private com.google.protobuf.Int32Value maxIssuerPathLength_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + maxIssuerPathLengthBuilder_; + /** + * + * + *
+       * Optional. Refers to the path length restriction X.509 extension. For a CA
+       * certificate, this value describes the depth of subordinate CA
+       * certificates that are allowed.
+       * If this value is less than 0, the request will fail.
+       * If this value is missing, the max path length will be omitted from the
+       * CA certificate.
+       * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the maxIssuerPathLength field is set. + */ + public boolean hasMaxIssuerPathLength() { + return maxIssuerPathLengthBuilder_ != null || maxIssuerPathLength_ != null; + } + /** + * + * + *
+       * Optional. Refers to the path length restriction X.509 extension. For a CA
+       * certificate, this value describes the depth of subordinate CA
+       * certificates that are allowed.
+       * If this value is less than 0, the request will fail.
+       * If this value is missing, the max path length will be omitted from the
+       * CA certificate.
+       * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maxIssuerPathLength. + */ + public com.google.protobuf.Int32Value getMaxIssuerPathLength() { + if (maxIssuerPathLengthBuilder_ == null) { + return maxIssuerPathLength_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxIssuerPathLength_; + } else { + return maxIssuerPathLengthBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Refers to the path length restriction X.509 extension. For a CA
+       * certificate, this value describes the depth of subordinate CA
+       * certificates that are allowed.
+       * If this value is less than 0, the request will fail.
+       * If this value is missing, the max path length will be omitted from the
+       * CA certificate.
+       * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMaxIssuerPathLength(com.google.protobuf.Int32Value value) { + if (maxIssuerPathLengthBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxIssuerPathLength_ = value; + onChanged(); + } else { + maxIssuerPathLengthBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Refers to the path length restriction X.509 extension. For a CA
+       * certificate, this value describes the depth of subordinate CA
+       * certificates that are allowed.
+       * If this value is less than 0, the request will fail.
+       * If this value is missing, the max path length will be omitted from the
+       * CA certificate.
+       * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMaxIssuerPathLength( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (maxIssuerPathLengthBuilder_ == null) { + maxIssuerPathLength_ = builderForValue.build(); + onChanged(); + } else { + maxIssuerPathLengthBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. Refers to the path length restriction X.509 extension. For a CA
+       * certificate, this value describes the depth of subordinate CA
+       * certificates that are allowed.
+       * If this value is less than 0, the request will fail.
+       * If this value is missing, the max path length will be omitted from the
+       * CA certificate.
+       * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMaxIssuerPathLength(com.google.protobuf.Int32Value value) { + if (maxIssuerPathLengthBuilder_ == null) { + if (maxIssuerPathLength_ != null) { + maxIssuerPathLength_ = + com.google.protobuf.Int32Value.newBuilder(maxIssuerPathLength_) + .mergeFrom(value) + .buildPartial(); + } else { + maxIssuerPathLength_ = value; + } + onChanged(); + } else { + maxIssuerPathLengthBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Refers to the path length restriction X.509 extension. For a CA
+       * certificate, this value describes the depth of subordinate CA
+       * certificates that are allowed.
+       * If this value is less than 0, the request will fail.
+       * If this value is missing, the max path length will be omitted from the
+       * CA certificate.
+       * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMaxIssuerPathLength() { + if (maxIssuerPathLengthBuilder_ == null) { + maxIssuerPathLength_ = null; + onChanged(); + } else { + maxIssuerPathLength_ = null; + maxIssuerPathLengthBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. Refers to the path length restriction X.509 extension. For a CA
+       * certificate, this value describes the depth of subordinate CA
+       * certificates that are allowed.
+       * If this value is less than 0, the request will fail.
+       * If this value is missing, the max path length will be omitted from the
+       * CA certificate.
+       * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int32Value.Builder getMaxIssuerPathLengthBuilder() { + + onChanged(); + return getMaxIssuerPathLengthFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Refers to the path length restriction X.509 extension. For a CA
+       * certificate, this value describes the depth of subordinate CA
+       * certificates that are allowed.
+       * If this value is less than 0, the request will fail.
+       * If this value is missing, the max path length will be omitted from the
+       * CA certificate.
+       * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int32ValueOrBuilder getMaxIssuerPathLengthOrBuilder() { + if (maxIssuerPathLengthBuilder_ != null) { + return maxIssuerPathLengthBuilder_.getMessageOrBuilder(); + } else { + return maxIssuerPathLength_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : maxIssuerPathLength_; + } + } + /** + * + * + *
+       * Optional. Refers to the path length restriction X.509 extension. For a CA
+       * certificate, this value describes the depth of subordinate CA
+       * certificates that are allowed.
+       * If this value is less than 0, the request will fail.
+       * If this value is missing, the max path length will be omitted from the
+       * CA certificate.
+       * 
+ * + * + * .google.protobuf.Int32Value max_issuer_path_length = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getMaxIssuerPathLengthFieldBuilder() { + if (maxIssuerPathLengthBuilder_ == null) { + maxIssuerPathLengthBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getMaxIssuerPathLength(), getParentForChildren(), isClean()); + maxIssuerPathLength_ = null; + } + return maxIssuerPathLengthBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions) + private static final com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions(); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CaOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CaOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int KEY_USAGE_FIELD_NUMBER = 1; + private com.google.cloud.security.privateca.v1beta1.KeyUsage keyUsage_; + /** + * + * + *
+   * Optional. Indicates the intended use for keys that correspond to a certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the keyUsage field is set. + */ + @java.lang.Override + public boolean hasKeyUsage() { + return keyUsage_ != null; + } + /** + * + * + *
+   * Optional. Indicates the intended use for keys that correspond to a certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The keyUsage. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsage getKeyUsage() { + return keyUsage_ == null + ? com.google.cloud.security.privateca.v1beta1.KeyUsage.getDefaultInstance() + : keyUsage_; + } + /** + * + * + *
+   * Optional. Indicates the intended use for keys that correspond to a certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.KeyUsageOrBuilder getKeyUsageOrBuilder() { + return getKeyUsage(); + } + + public static final int CA_OPTIONS_FIELD_NUMBER = 2; + private com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions caOptions_; + /** + * + * + *
+   * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+   * relevant in a CA certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the caOptions field is set. + */ + @java.lang.Override + public boolean hasCaOptions() { + return caOptions_ != null; + } + /** + * + * + *
+   * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+   * relevant in a CA certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The caOptions. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions getCaOptions() { + return caOptions_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + .getDefaultInstance() + : caOptions_; + } + /** + * + * + *
+   * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+   * relevant in a CA certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptionsOrBuilder + getCaOptionsOrBuilder() { + return getCaOptions(); + } + + public static final int POLICY_IDS_FIELD_NUMBER = 3; + private java.util.List policyIds_; + /** + * + * + *
+   * Optional. Describes the X.509 certificate policy object identifiers, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getPolicyIdsList() { + return policyIds_; + } + /** + * + * + *
+   * Optional. Describes the X.509 certificate policy object identifiers, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getPolicyIdsOrBuilderList() { + return policyIds_; + } + /** + * + * + *
+   * Optional. Describes the X.509 certificate policy object identifiers, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getPolicyIdsCount() { + return policyIds_.size(); + } + /** + * + * + *
+   * Optional. Describes the X.509 certificate policy object identifiers, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ObjectId getPolicyIds(int index) { + return policyIds_.get(index); + } + /** + * + * + *
+   * Optional. Describes the X.509 certificate policy object identifiers, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder getPolicyIdsOrBuilder( + int index) { + return policyIds_.get(index); + } + + public static final int AIA_OCSP_SERVERS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList aiaOcspServers_; + /** + * + * + *
+   * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+   * that appear in the "Authority Information Access" extension in the
+   * certificate.
+   * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the aiaOcspServers. + */ + public com.google.protobuf.ProtocolStringList getAiaOcspServersList() { + return aiaOcspServers_; + } + /** + * + * + *
+   * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+   * that appear in the "Authority Information Access" extension in the
+   * certificate.
+   * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of aiaOcspServers. + */ + public int getAiaOcspServersCount() { + return aiaOcspServers_.size(); + } + /** + * + * + *
+   * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+   * that appear in the "Authority Information Access" extension in the
+   * certificate.
+   * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The aiaOcspServers at the given index. + */ + public java.lang.String getAiaOcspServers(int index) { + return aiaOcspServers_.get(index); + } + /** + * + * + *
+   * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+   * that appear in the "Authority Information Access" extension in the
+   * certificate.
+   * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the aiaOcspServers at the given index. + */ + public com.google.protobuf.ByteString getAiaOcspServersBytes(int index) { + return aiaOcspServers_.getByteString(index); + } + + public static final int ADDITIONAL_EXTENSIONS_FIELD_NUMBER = 5; + private java.util.List + additionalExtensions_; + /** + * + * + *
+   * Optional. Describes custom X.509 extensions.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getAdditionalExtensionsList() { + return additionalExtensions_; + } + /** + * + * + *
+   * Optional. Describes custom X.509 extensions.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder> + getAdditionalExtensionsOrBuilderList() { + return additionalExtensions_; + } + /** + * + * + *
+   * Optional. Describes custom X.509 extensions.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getAdditionalExtensionsCount() { + return additionalExtensions_.size(); + } + /** + * + * + *
+   * Optional. Describes custom X.509 extensions.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.X509Extension getAdditionalExtensions( + int index) { + return additionalExtensions_.get(index); + } + /** + * + * + *
+   * Optional. Describes custom X.509 extensions.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder + getAdditionalExtensionsOrBuilder(int index) { + return additionalExtensions_.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 (keyUsage_ != null) { + output.writeMessage(1, getKeyUsage()); + } + if (caOptions_ != null) { + output.writeMessage(2, getCaOptions()); + } + for (int i = 0; i < policyIds_.size(); i++) { + output.writeMessage(3, policyIds_.get(i)); + } + for (int i = 0; i < aiaOcspServers_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, aiaOcspServers_.getRaw(i)); + } + for (int i = 0; i < additionalExtensions_.size(); i++) { + output.writeMessage(5, additionalExtensions_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (keyUsage_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKeyUsage()); + } + if (caOptions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCaOptions()); + } + for (int i = 0; i < policyIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, policyIds_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < aiaOcspServers_.size(); i++) { + dataSize += computeStringSizeNoTag(aiaOcspServers_.getRaw(i)); + } + size += dataSize; + size += 1 * getAiaOcspServersList().size(); + } + for (int i = 0; i < additionalExtensions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, additionalExtensions_.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.security.privateca.v1beta1.ReusableConfigValues)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues other = + (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) obj; + + if (hasKeyUsage() != other.hasKeyUsage()) return false; + if (hasKeyUsage()) { + if (!getKeyUsage().equals(other.getKeyUsage())) return false; + } + if (hasCaOptions() != other.hasCaOptions()) return false; + if (hasCaOptions()) { + if (!getCaOptions().equals(other.getCaOptions())) return false; + } + if (!getPolicyIdsList().equals(other.getPolicyIdsList())) return false; + if (!getAiaOcspServersList().equals(other.getAiaOcspServersList())) return false; + if (!getAdditionalExtensionsList().equals(other.getAdditionalExtensionsList())) return false; + if (!unknownFields.equals(other.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 (hasKeyUsage()) { + hash = (37 * hash) + KEY_USAGE_FIELD_NUMBER; + hash = (53 * hash) + getKeyUsage().hashCode(); + } + if (hasCaOptions()) { + hash = (37 * hash) + CA_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getCaOptions().hashCode(); + } + if (getPolicyIdsCount() > 0) { + hash = (37 * hash) + POLICY_IDS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyIdsList().hashCode(); + } + if (getAiaOcspServersCount() > 0) { + hash = (37 * hash) + AIA_OCSP_SERVERS_FIELD_NUMBER; + hash = (53 * hash) + getAiaOcspServersList().hashCode(); + } + if (getAdditionalExtensionsCount() > 0) { + hash = (37 * hash) + ADDITIONAL_EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalExtensionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] is used to describe certain fields of an
+   * X.509 certificate, such as the key usage fields, fields specific to CA
+   * certificates, certificate policy extensions and custom extensions.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ReusableConfigValues} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ReusableConfigValues) + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.class, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPolicyIdsFieldBuilder(); + getAdditionalExtensionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (keyUsageBuilder_ == null) { + keyUsage_ = null; + } else { + keyUsage_ = null; + keyUsageBuilder_ = null; + } + if (caOptionsBuilder_ == null) { + caOptions_ = null; + } else { + caOptions_ = null; + caOptionsBuilder_ = null; + } + if (policyIdsBuilder_ == null) { + policyIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + policyIdsBuilder_.clear(); + } + aiaOcspServers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (additionalExtensionsBuilder_ == null) { + additionalExtensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + additionalExtensionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigValues_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues build() { + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues buildPartial() { + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues result = + new com.google.cloud.security.privateca.v1beta1.ReusableConfigValues(this); + int from_bitField0_ = bitField0_; + if (keyUsageBuilder_ == null) { + result.keyUsage_ = keyUsage_; + } else { + result.keyUsage_ = keyUsageBuilder_.build(); + } + if (caOptionsBuilder_ == null) { + result.caOptions_ = caOptions_; + } else { + result.caOptions_ = caOptionsBuilder_.build(); + } + if (policyIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyIds_ = java.util.Collections.unmodifiableList(policyIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyIds_ = policyIds_; + } else { + result.policyIds_ = policyIdsBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + aiaOcspServers_ = aiaOcspServers_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.aiaOcspServers_ = aiaOcspServers_; + if (additionalExtensionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + additionalExtensions_ = java.util.Collections.unmodifiableList(additionalExtensions_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.additionalExtensions_ = additionalExtensions_; + } else { + result.additionalExtensions_ = additionalExtensionsBuilder_.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.security.privateca.v1beta1.ReusableConfigValues) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.getDefaultInstance()) + return this; + if (other.hasKeyUsage()) { + mergeKeyUsage(other.getKeyUsage()); + } + if (other.hasCaOptions()) { + mergeCaOptions(other.getCaOptions()); + } + if (policyIdsBuilder_ == null) { + if (!other.policyIds_.isEmpty()) { + if (policyIds_.isEmpty()) { + policyIds_ = other.policyIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyIdsIsMutable(); + policyIds_.addAll(other.policyIds_); + } + onChanged(); + } + } else { + if (!other.policyIds_.isEmpty()) { + if (policyIdsBuilder_.isEmpty()) { + policyIdsBuilder_.dispose(); + policyIdsBuilder_ = null; + policyIds_ = other.policyIds_; + bitField0_ = (bitField0_ & ~0x00000001); + policyIdsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPolicyIdsFieldBuilder() + : null; + } else { + policyIdsBuilder_.addAllMessages(other.policyIds_); + } + } + } + if (!other.aiaOcspServers_.isEmpty()) { + if (aiaOcspServers_.isEmpty()) { + aiaOcspServers_ = other.aiaOcspServers_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAiaOcspServersIsMutable(); + aiaOcspServers_.addAll(other.aiaOcspServers_); + } + onChanged(); + } + if (additionalExtensionsBuilder_ == null) { + if (!other.additionalExtensions_.isEmpty()) { + if (additionalExtensions_.isEmpty()) { + additionalExtensions_ = other.additionalExtensions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAdditionalExtensionsIsMutable(); + additionalExtensions_.addAll(other.additionalExtensions_); + } + onChanged(); + } + } else { + if (!other.additionalExtensions_.isEmpty()) { + if (additionalExtensionsBuilder_.isEmpty()) { + additionalExtensionsBuilder_.dispose(); + additionalExtensionsBuilder_ = null; + additionalExtensions_ = other.additionalExtensions_; + bitField0_ = (bitField0_ & ~0x00000004); + additionalExtensionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAdditionalExtensionsFieldBuilder() + : null; + } else { + additionalExtensionsBuilder_.addAllMessages(other.additionalExtensions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.security.privateca.v1beta1.KeyUsage keyUsage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.KeyUsage, + com.google.cloud.security.privateca.v1beta1.KeyUsage.Builder, + com.google.cloud.security.privateca.v1beta1.KeyUsageOrBuilder> + keyUsageBuilder_; + /** + * + * + *
+     * Optional. Indicates the intended use for keys that correspond to a certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the keyUsage field is set. + */ + public boolean hasKeyUsage() { + return keyUsageBuilder_ != null || keyUsage_ != null; + } + /** + * + * + *
+     * Optional. Indicates the intended use for keys that correspond to a certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The keyUsage. + */ + public com.google.cloud.security.privateca.v1beta1.KeyUsage getKeyUsage() { + if (keyUsageBuilder_ == null) { + return keyUsage_ == null + ? com.google.cloud.security.privateca.v1beta1.KeyUsage.getDefaultInstance() + : keyUsage_; + } else { + return keyUsageBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Indicates the intended use for keys that correspond to a certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKeyUsage(com.google.cloud.security.privateca.v1beta1.KeyUsage value) { + if (keyUsageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keyUsage_ = value; + onChanged(); + } else { + keyUsageBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Indicates the intended use for keys that correspond to a certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKeyUsage( + com.google.cloud.security.privateca.v1beta1.KeyUsage.Builder builderForValue) { + if (keyUsageBuilder_ == null) { + keyUsage_ = builderForValue.build(); + onChanged(); + } else { + keyUsageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Indicates the intended use for keys that correspond to a certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeKeyUsage(com.google.cloud.security.privateca.v1beta1.KeyUsage value) { + if (keyUsageBuilder_ == null) { + if (keyUsage_ != null) { + keyUsage_ = + com.google.cloud.security.privateca.v1beta1.KeyUsage.newBuilder(keyUsage_) + .mergeFrom(value) + .buildPartial(); + } else { + keyUsage_ = value; + } + onChanged(); + } else { + keyUsageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Indicates the intended use for keys that correspond to a certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearKeyUsage() { + if (keyUsageBuilder_ == null) { + keyUsage_ = null; + onChanged(); + } else { + keyUsage_ = null; + keyUsageBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Indicates the intended use for keys that correspond to a certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.KeyUsage.Builder getKeyUsageBuilder() { + + onChanged(); + return getKeyUsageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Indicates the intended use for keys that correspond to a certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.KeyUsageOrBuilder getKeyUsageOrBuilder() { + if (keyUsageBuilder_ != null) { + return keyUsageBuilder_.getMessageOrBuilder(); + } else { + return keyUsage_ == null + ? com.google.cloud.security.privateca.v1beta1.KeyUsage.getDefaultInstance() + : keyUsage_; + } + } + /** + * + * + *
+     * Optional. Indicates the intended use for keys that correspond to a certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.KeyUsage, + com.google.cloud.security.privateca.v1beta1.KeyUsage.Builder, + com.google.cloud.security.privateca.v1beta1.KeyUsageOrBuilder> + getKeyUsageFieldBuilder() { + if (keyUsageBuilder_ == null) { + keyUsageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.KeyUsage, + com.google.cloud.security.privateca.v1beta1.KeyUsage.Builder, + com.google.cloud.security.privateca.v1beta1.KeyUsageOrBuilder>( + getKeyUsage(), getParentForChildren(), isClean()); + keyUsage_ = null; + } + return keyUsageBuilder_; + } + + private com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions caOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptionsOrBuilder> + caOptionsBuilder_; + /** + * + * + *
+     * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+     * relevant in a CA certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the caOptions field is set. + */ + public boolean hasCaOptions() { + return caOptionsBuilder_ != null || caOptions_ != null; + } + /** + * + * + *
+     * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+     * relevant in a CA certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The caOptions. + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + getCaOptions() { + if (caOptionsBuilder_ == null) { + return caOptions_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + .getDefaultInstance() + : caOptions_; + } else { + return caOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+     * relevant in a CA certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCaOptions( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions value) { + if (caOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + caOptions_ = value; + onChanged(); + } else { + caOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+     * relevant in a CA certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCaOptions( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.Builder + builderForValue) { + if (caOptionsBuilder_ == null) { + caOptions_ = builderForValue.build(); + onChanged(); + } else { + caOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+     * relevant in a CA certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCaOptions( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions value) { + if (caOptionsBuilder_ == null) { + if (caOptions_ != null) { + caOptions_ = + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.newBuilder( + caOptions_) + .mergeFrom(value) + .buildPartial(); + } else { + caOptions_ = value; + } + onChanged(); + } else { + caOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+     * relevant in a CA certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCaOptions() { + if (caOptionsBuilder_ == null) { + caOptions_ = null; + onChanged(); + } else { + caOptions_ = null; + caOptionsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+     * relevant in a CA certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.Builder + getCaOptionsBuilder() { + + onChanged(); + return getCaOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+     * relevant in a CA certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptionsOrBuilder + getCaOptionsOrBuilder() { + if (caOptionsBuilder_ != null) { + return caOptionsBuilder_.getMessageOrBuilder(); + } else { + return caOptions_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + .getDefaultInstance() + : caOptions_; + } + } + /** + * + * + *
+     * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+     * relevant in a CA certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptionsOrBuilder> + getCaOptionsFieldBuilder() { + if (caOptionsBuilder_ == null) { + caOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues + .CaOptionsOrBuilder>(getCaOptions(), getParentForChildren(), isClean()); + caOptions_ = null; + } + return caOptionsBuilder_; + } + + private java.util.List policyIds_ = + java.util.Collections.emptyList(); + + private void ensurePolicyIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyIds_ = + new java.util.ArrayList( + policyIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ObjectId, + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder, + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder> + policyIdsBuilder_; + + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getPolicyIdsList() { + if (policyIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyIds_); + } else { + return policyIdsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getPolicyIdsCount() { + if (policyIdsBuilder_ == null) { + return policyIds_.size(); + } else { + return policyIdsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectId getPolicyIds(int index) { + if (policyIdsBuilder_ == null) { + return policyIds_.get(index); + } else { + return policyIdsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPolicyIds( + int index, com.google.cloud.security.privateca.v1beta1.ObjectId value) { + if (policyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyIdsIsMutable(); + policyIds_.set(index, value); + onChanged(); + } else { + policyIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPolicyIds( + int index, com.google.cloud.security.privateca.v1beta1.ObjectId.Builder builderForValue) { + if (policyIdsBuilder_ == null) { + ensurePolicyIdsIsMutable(); + policyIds_.set(index, builderForValue.build()); + onChanged(); + } else { + policyIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPolicyIds(com.google.cloud.security.privateca.v1beta1.ObjectId value) { + if (policyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyIdsIsMutable(); + policyIds_.add(value); + onChanged(); + } else { + policyIdsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPolicyIds( + int index, com.google.cloud.security.privateca.v1beta1.ObjectId value) { + if (policyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyIdsIsMutable(); + policyIds_.add(index, value); + onChanged(); + } else { + policyIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPolicyIds( + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder builderForValue) { + if (policyIdsBuilder_ == null) { + ensurePolicyIdsIsMutable(); + policyIds_.add(builderForValue.build()); + onChanged(); + } else { + policyIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPolicyIds( + int index, com.google.cloud.security.privateca.v1beta1.ObjectId.Builder builderForValue) { + if (policyIdsBuilder_ == null) { + ensurePolicyIdsIsMutable(); + policyIds_.add(index, builderForValue.build()); + onChanged(); + } else { + policyIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllPolicyIds( + java.lang.Iterable values) { + if (policyIdsBuilder_ == null) { + ensurePolicyIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyIds_); + onChanged(); + } else { + policyIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPolicyIds() { + if (policyIdsBuilder_ == null) { + policyIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyIdsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removePolicyIds(int index) { + if (policyIdsBuilder_ == null) { + ensurePolicyIdsIsMutable(); + policyIds_.remove(index); + onChanged(); + } else { + policyIdsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectId.Builder getPolicyIdsBuilder( + int index) { + return getPolicyIdsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder getPolicyIdsOrBuilder( + int index) { + if (policyIdsBuilder_ == null) { + return policyIds_.get(index); + } else { + return policyIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getPolicyIdsOrBuilderList() { + if (policyIdsBuilder_ != null) { + return policyIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyIds_); + } + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectId.Builder addPolicyIdsBuilder() { + return getPolicyIdsFieldBuilder() + .addBuilder(com.google.cloud.security.privateca.v1beta1.ObjectId.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectId.Builder addPolicyIdsBuilder( + int index) { + return getPolicyIdsFieldBuilder() + .addBuilder( + index, com.google.cloud.security.privateca.v1beta1.ObjectId.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Describes the X.509 certificate policy object identifiers, per
+     * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getPolicyIdsBuilderList() { + return getPolicyIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ObjectId, + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder, + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder> + getPolicyIdsFieldBuilder() { + if (policyIdsBuilder_ == null) { + policyIdsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ObjectId, + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder, + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder>( + policyIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + policyIds_ = null; + } + return policyIdsBuilder_; + } + + private com.google.protobuf.LazyStringList aiaOcspServers_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAiaOcspServersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + aiaOcspServers_ = new com.google.protobuf.LazyStringArrayList(aiaOcspServers_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+     * that appear in the "Authority Information Access" extension in the
+     * certificate.
+     * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the aiaOcspServers. + */ + public com.google.protobuf.ProtocolStringList getAiaOcspServersList() { + return aiaOcspServers_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+     * that appear in the "Authority Information Access" extension in the
+     * certificate.
+     * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of aiaOcspServers. + */ + public int getAiaOcspServersCount() { + return aiaOcspServers_.size(); + } + /** + * + * + *
+     * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+     * that appear in the "Authority Information Access" extension in the
+     * certificate.
+     * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The aiaOcspServers at the given index. + */ + public java.lang.String getAiaOcspServers(int index) { + return aiaOcspServers_.get(index); + } + /** + * + * + *
+     * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+     * that appear in the "Authority Information Access" extension in the
+     * certificate.
+     * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the aiaOcspServers at the given index. + */ + public com.google.protobuf.ByteString getAiaOcspServersBytes(int index) { + return aiaOcspServers_.getByteString(index); + } + /** + * + * + *
+     * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+     * that appear in the "Authority Information Access" extension in the
+     * certificate.
+     * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The aiaOcspServers to set. + * @return This builder for chaining. + */ + public Builder setAiaOcspServers(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAiaOcspServersIsMutable(); + aiaOcspServers_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+     * that appear in the "Authority Information Access" extension in the
+     * certificate.
+     * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The aiaOcspServers to add. + * @return This builder for chaining. + */ + public Builder addAiaOcspServers(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAiaOcspServersIsMutable(); + aiaOcspServers_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+     * that appear in the "Authority Information Access" extension in the
+     * certificate.
+     * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The aiaOcspServers to add. + * @return This builder for chaining. + */ + public Builder addAllAiaOcspServers(java.lang.Iterable values) { + ensureAiaOcspServersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, aiaOcspServers_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+     * that appear in the "Authority Information Access" extension in the
+     * certificate.
+     * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAiaOcspServers() { + aiaOcspServers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+     * that appear in the "Authority Information Access" extension in the
+     * certificate.
+     * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the aiaOcspServers to add. + * @return This builder for chaining. + */ + public Builder addAiaOcspServersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAiaOcspServersIsMutable(); + aiaOcspServers_.add(value); + onChanged(); + return this; + } + + private java.util.List + additionalExtensions_ = java.util.Collections.emptyList(); + + private void ensureAdditionalExtensionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + additionalExtensions_ = + new java.util.ArrayList( + additionalExtensions_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.X509Extension, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder, + com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder> + additionalExtensionsBuilder_; + + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAdditionalExtensionsList() { + if (additionalExtensionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(additionalExtensions_); + } else { + return additionalExtensionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAdditionalExtensionsCount() { + if (additionalExtensionsBuilder_ == null) { + return additionalExtensions_.size(); + } else { + return additionalExtensionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.X509Extension getAdditionalExtensions( + int index) { + if (additionalExtensionsBuilder_ == null) { + return additionalExtensions_.get(index); + } else { + return additionalExtensionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdditionalExtensions( + int index, com.google.cloud.security.privateca.v1beta1.X509Extension value) { + if (additionalExtensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalExtensionsIsMutable(); + additionalExtensions_.set(index, value); + onChanged(); + } else { + additionalExtensionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdditionalExtensions( + int index, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder builderForValue) { + if (additionalExtensionsBuilder_ == null) { + ensureAdditionalExtensionsIsMutable(); + additionalExtensions_.set(index, builderForValue.build()); + onChanged(); + } else { + additionalExtensionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAdditionalExtensions( + com.google.cloud.security.privateca.v1beta1.X509Extension value) { + if (additionalExtensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalExtensionsIsMutable(); + additionalExtensions_.add(value); + onChanged(); + } else { + additionalExtensionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAdditionalExtensions( + int index, com.google.cloud.security.privateca.v1beta1.X509Extension value) { + if (additionalExtensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalExtensionsIsMutable(); + additionalExtensions_.add(index, value); + onChanged(); + } else { + additionalExtensionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAdditionalExtensions( + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder builderForValue) { + if (additionalExtensionsBuilder_ == null) { + ensureAdditionalExtensionsIsMutable(); + additionalExtensions_.add(builderForValue.build()); + onChanged(); + } else { + additionalExtensionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAdditionalExtensions( + int index, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder builderForValue) { + if (additionalExtensionsBuilder_ == null) { + ensureAdditionalExtensionsIsMutable(); + additionalExtensions_.add(index, builderForValue.build()); + onChanged(); + } else { + additionalExtensionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAdditionalExtensions( + java.lang.Iterable + values) { + if (additionalExtensionsBuilder_ == null) { + ensureAdditionalExtensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, additionalExtensions_); + onChanged(); + } else { + additionalExtensionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAdditionalExtensions() { + if (additionalExtensionsBuilder_ == null) { + additionalExtensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + additionalExtensionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAdditionalExtensions(int index) { + if (additionalExtensionsBuilder_ == null) { + ensureAdditionalExtensionsIsMutable(); + additionalExtensions_.remove(index); + onChanged(); + } else { + additionalExtensionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.X509Extension.Builder + getAdditionalExtensionsBuilder(int index) { + return getAdditionalExtensionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder + getAdditionalExtensionsOrBuilder(int index) { + if (additionalExtensionsBuilder_ == null) { + return additionalExtensions_.get(index); + } else { + return additionalExtensionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder> + getAdditionalExtensionsOrBuilderList() { + if (additionalExtensionsBuilder_ != null) { + return additionalExtensionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(additionalExtensions_); + } + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.X509Extension.Builder + addAdditionalExtensionsBuilder() { + return getAdditionalExtensionsFieldBuilder() + .addBuilder( + com.google.cloud.security.privateca.v1beta1.X509Extension.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.security.privateca.v1beta1.X509Extension.Builder + addAdditionalExtensionsBuilder(int index) { + return getAdditionalExtensionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.security.privateca.v1beta1.X509Extension.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Describes custom X.509 extensions.
+     * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAdditionalExtensionsBuilderList() { + return getAdditionalExtensionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.X509Extension, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder, + com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder> + getAdditionalExtensionsFieldBuilder() { + if (additionalExtensionsBuilder_ == null) { + additionalExtensionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.X509Extension, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder, + com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder>( + additionalExtensions_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + additionalExtensions_ = null; + } + return additionalExtensionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ReusableConfigValues) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ReusableConfigValues) + private static final com.google.cloud.security.privateca.v1beta1.ReusableConfigValues + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.ReusableConfigValues(); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigValues + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReusableConfigValues parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReusableConfigValues(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigValuesOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigValuesOrBuilder.java new file mode 100644 index 00000000..032b7179 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigValuesOrBuilder.java @@ -0,0 +1,301 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ReusableConfigValuesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ReusableConfigValues) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Indicates the intended use for keys that correspond to a certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the keyUsage field is set. + */ + boolean hasKeyUsage(); + /** + * + * + *
+   * Optional. Indicates the intended use for keys that correspond to a certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The keyUsage. + */ + com.google.cloud.security.privateca.v1beta1.KeyUsage getKeyUsage(); + /** + * + * + *
+   * Optional. Indicates the intended use for keys that correspond to a certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.KeyUsage key_usage = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.KeyUsageOrBuilder getKeyUsageOrBuilder(); + + /** + * + * + *
+   * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+   * relevant in a CA certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the caOptions field is set. + */ + boolean hasCaOptions(); + /** + * + * + *
+   * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+   * relevant in a CA certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The caOptions. + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions getCaOptions(); + /** + * + * + *
+   * Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
+   * relevant in a CA certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions ca_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptionsOrBuilder + getCaOptionsOrBuilder(); + + /** + * + * + *
+   * Optional. Describes the X.509 certificate policy object identifiers, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getPolicyIdsList(); + /** + * + * + *
+   * Optional. Describes the X.509 certificate policy object identifiers, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.ObjectId getPolicyIds(int index); + /** + * + * + *
+   * Optional. Describes the X.509 certificate policy object identifiers, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getPolicyIdsCount(); + /** + * + * + *
+   * Optional. Describes the X.509 certificate policy object identifiers, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getPolicyIdsOrBuilderList(); + /** + * + * + *
+   * Optional. Describes the X.509 certificate policy object identifiers, per
+   * https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.ObjectId policy_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder getPolicyIdsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+   * that appear in the "Authority Information Access" extension in the
+   * certificate.
+   * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the aiaOcspServers. + */ + java.util.List getAiaOcspServersList(); + /** + * + * + *
+   * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+   * that appear in the "Authority Information Access" extension in the
+   * certificate.
+   * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of aiaOcspServers. + */ + int getAiaOcspServersCount(); + /** + * + * + *
+   * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+   * that appear in the "Authority Information Access" extension in the
+   * certificate.
+   * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The aiaOcspServers at the given index. + */ + java.lang.String getAiaOcspServers(int index); + /** + * + * + *
+   * Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
+   * that appear in the "Authority Information Access" extension in the
+   * certificate.
+   * 
+ * + * repeated string aia_ocsp_servers = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the aiaOcspServers at the given index. + */ + com.google.protobuf.ByteString getAiaOcspServersBytes(int index); + + /** + * + * + *
+   * Optional. Describes custom X.509 extensions.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAdditionalExtensionsList(); + /** + * + * + *
+   * Optional. Describes custom X.509 extensions.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.X509Extension getAdditionalExtensions(int index); + /** + * + * + *
+   * Optional. Describes custom X.509 extensions.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAdditionalExtensionsCount(); + /** + * + * + *
+   * Optional. Describes custom X.509 extensions.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAdditionalExtensionsOrBuilderList(); + /** + * + * + *
+   * Optional. Describes custom X.509 extensions.
+   * 
+ * + * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension additional_extensions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder + getAdditionalExtensionsOrBuilder(int index); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigWrapper.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigWrapper.java new file mode 100644 index 00000000..771562cb --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigWrapper.java @@ -0,0 +1,1108 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * A [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] describes values that may assist in creating an
+ * X.509 certificate, or a reference to a pre-defined set of values.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ReusableConfigWrapper} + */ +public final class ReusableConfigWrapper extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + ReusableConfigWrapperOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReusableConfigWrapper.newBuilder() to construct. + private ReusableConfigWrapper(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReusableConfigWrapper() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReusableConfigWrapper(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReusableConfigWrapper( + 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(); + configValuesCase_ = 1; + configValues_ = s; + break; + } + case 18: + { + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder subBuilder = + null; + if (configValuesCase_ == 2) { + subBuilder = + ((com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) + configValues_) + .toBuilder(); + } + configValues_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) + configValues_); + configValues_ = subBuilder.buildPartial(); + } + configValuesCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigWrapper_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigWrapper_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.class, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder.class); + } + + private int configValuesCase_ = 0; + private java.lang.Object configValues_; + + public enum ConfigValuesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REUSABLE_CONFIG(1), + REUSABLE_CONFIG_VALUES(2), + CONFIGVALUES_NOT_SET(0); + private final int value; + + private ConfigValuesCase(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 ConfigValuesCase valueOf(int value) { + return forNumber(value); + } + + public static ConfigValuesCase forNumber(int value) { + switch (value) { + case 1: + return REUSABLE_CONFIG; + case 2: + return REUSABLE_CONFIG_VALUES; + case 0: + return CONFIGVALUES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConfigValuesCase getConfigValuesCase() { + return ConfigValuesCase.forNumber(configValuesCase_); + } + + public static final int REUSABLE_CONFIG_FIELD_NUMBER = 1; + /** + * + * + *
+   * Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * string reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reusableConfig. + */ + public java.lang.String getReusableConfig() { + java.lang.Object ref = ""; + if (configValuesCase_ == 1) { + ref = configValues_; + } + if (ref instanceof java.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 (configValuesCase_ == 1) { + configValues_ = s; + } + return s; + } + } + /** + * + * + *
+   * Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * string reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reusableConfig. + */ + public com.google.protobuf.ByteString getReusableConfigBytes() { + java.lang.Object ref = ""; + if (configValuesCase_ == 1) { + ref = configValues_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (configValuesCase_ == 1) { + configValues_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REUSABLE_CONFIG_VALUES_FIELD_NUMBER = 2; + /** + * + * + *
+   * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfigValues field is set. + */ + @java.lang.Override + public boolean hasReusableConfigValues() { + return configValuesCase_ == 2; + } + /** + * + * + *
+   * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfigValues. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues + getReusableConfigValues() { + if (configValuesCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) configValues_; + } + return com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.getDefaultInstance(); + } + /** + * + * + *
+   * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder + getReusableConfigValuesOrBuilder() { + if (configValuesCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) configValues_; + } + return com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.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 (configValuesCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, configValues_); + } + if (configValuesCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) configValues_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (configValuesCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, configValues_); + } + if (configValuesCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) configValues_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper other = + (com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) obj; + + if (!getConfigValuesCase().equals(other.getConfigValuesCase())) return false; + switch (configValuesCase_) { + case 1: + if (!getReusableConfig().equals(other.getReusableConfig())) return false; + break; + case 2: + if (!getReusableConfigValues().equals(other.getReusableConfigValues())) 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 (configValuesCase_) { + case 1: + hash = (37 * hash) + REUSABLE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getReusableConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + REUSABLE_CONFIG_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getReusableConfigValues().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] describes values that may assist in creating an
+   * X.509 certificate, or a reference to a pre-defined set of values.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.ReusableConfigWrapper} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigWrapper_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigWrapper_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.class, + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + configValuesCase_ = 0; + configValues_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_ReusableConfigWrapper_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper build() { + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper buildPartial() { + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper result = + new com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper(this); + if (configValuesCase_ == 1) { + result.configValues_ = configValues_; + } + if (configValuesCase_ == 2) { + if (reusableConfigValuesBuilder_ == null) { + result.configValues_ = configValues_; + } else { + result.configValues_ = reusableConfigValuesBuilder_.build(); + } + } + result.configValuesCase_ = configValuesCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.getDefaultInstance()) + return this; + switch (other.getConfigValuesCase()) { + case REUSABLE_CONFIG: + { + configValuesCase_ = 1; + configValues_ = other.configValues_; + onChanged(); + break; + } + case REUSABLE_CONFIG_VALUES: + { + mergeReusableConfigValues(other.getReusableConfigValues()); + break; + } + case CONFIGVALUES_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.security.privateca.v1beta1.ReusableConfigWrapper parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int configValuesCase_ = 0; + private java.lang.Object configValues_; + + public ConfigValuesCase getConfigValuesCase() { + return ConfigValuesCase.forNumber(configValuesCase_); + } + + public Builder clearConfigValues() { + configValuesCase_ = 0; + configValues_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * string reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reusableConfig. + */ + @java.lang.Override + public java.lang.String getReusableConfig() { + java.lang.Object ref = ""; + if (configValuesCase_ == 1) { + ref = configValues_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (configValuesCase_ == 1) { + configValues_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * string reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reusableConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReusableConfigBytes() { + java.lang.Object ref = ""; + if (configValuesCase_ == 1) { + ref = configValues_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (configValuesCase_ == 1) { + configValues_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * string reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The reusableConfig to set. + * @return This builder for chaining. + */ + public Builder setReusableConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + configValuesCase_ = 1; + configValues_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * string reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearReusableConfig() { + if (configValuesCase_ == 1) { + configValuesCase_ = 0; + configValues_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+     * `projects/*/locations/*/reusableConfigs/*`.
+     * 
+ * + * string reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for reusableConfig to set. + * @return This builder for chaining. + */ + public Builder setReusableConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + configValuesCase_ = 1; + configValues_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder> + reusableConfigValuesBuilder_; + /** + * + * + *
+     * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfigValues field is set. + */ + @java.lang.Override + public boolean hasReusableConfigValues() { + return configValuesCase_ == 2; + } + /** + * + * + *
+     * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfigValues. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues + getReusableConfigValues() { + if (reusableConfigValuesBuilder_ == null) { + if (configValuesCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) configValues_; + } + return com.google.cloud.security.privateca.v1beta1.ReusableConfigValues + .getDefaultInstance(); + } else { + if (configValuesCase_ == 2) { + return reusableConfigValuesBuilder_.getMessage(); + } + return com.google.cloud.security.privateca.v1beta1.ReusableConfigValues + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReusableConfigValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues value) { + if (reusableConfigValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configValues_ = value; + onChanged(); + } else { + reusableConfigValuesBuilder_.setMessage(value); + } + configValuesCase_ = 2; + return this; + } + /** + * + * + *
+     * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReusableConfigValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder builderForValue) { + if (reusableConfigValuesBuilder_ == null) { + configValues_ = builderForValue.build(); + onChanged(); + } else { + reusableConfigValuesBuilder_.setMessage(builderForValue.build()); + } + configValuesCase_ = 2; + return this; + } + /** + * + * + *
+     * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeReusableConfigValues( + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues value) { + if (reusableConfigValuesBuilder_ == null) { + if (configValuesCase_ == 2 + && configValues_ + != com.google.cloud.security.privateca.v1beta1.ReusableConfigValues + .getDefaultInstance()) { + configValues_ = + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.newBuilder( + (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) + configValues_) + .mergeFrom(value) + .buildPartial(); + } else { + configValues_ = value; + } + onChanged(); + } else { + if (configValuesCase_ == 2) { + reusableConfigValuesBuilder_.mergeFrom(value); + } + reusableConfigValuesBuilder_.setMessage(value); + } + configValuesCase_ = 2; + return this; + } + /** + * + * + *
+     * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearReusableConfigValues() { + if (reusableConfigValuesBuilder_ == null) { + if (configValuesCase_ == 2) { + configValuesCase_ = 0; + configValues_ = null; + onChanged(); + } + } else { + if (configValuesCase_ == 2) { + configValuesCase_ = 0; + configValues_ = null; + } + reusableConfigValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder + getReusableConfigValuesBuilder() { + return getReusableConfigValuesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder + getReusableConfigValuesOrBuilder() { + if ((configValuesCase_ == 2) && (reusableConfigValuesBuilder_ != null)) { + return reusableConfigValuesBuilder_.getMessageOrBuilder(); + } else { + if (configValuesCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) configValues_; + } + return com.google.cloud.security.privateca.v1beta1.ReusableConfigValues + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder> + getReusableConfigValuesFieldBuilder() { + if (reusableConfigValuesBuilder_ == null) { + if (!(configValuesCase_ == 2)) { + configValues_ = + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.getDefaultInstance(); + } + reusableConfigValuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder>( + (com.google.cloud.security.privateca.v1beta1.ReusableConfigValues) configValues_, + getParentForChildren(), + isClean()); + configValues_ = null; + } + configValuesCase_ = 2; + onChanged(); + ; + return reusableConfigValuesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + private static final com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper(); + } + + public static com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReusableConfigWrapper parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReusableConfigWrapper(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigWrapperOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigWrapperOrBuilder.java new file mode 100644 index 00000000..5117c2e1 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ReusableConfigWrapperOrBuilder.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/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ReusableConfigWrapperOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * string reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The reusableConfig. + */ + java.lang.String getReusableConfig(); + /** + * + * + *
+   * Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
+   * `projects/*/locations/*/reusableConfigs/*`.
+   * 
+ * + * string reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for reusableConfig. + */ + com.google.protobuf.ByteString getReusableConfigBytes(); + + /** + * + * + *
+   * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfigValues field is set. + */ + boolean hasReusableConfigValues(); + /** + * + * + *
+   * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfigValues. + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigValues getReusableConfigValues(); + /** + * + * + *
+   * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigValuesOrBuilder + getReusableConfigValuesOrBuilder(); + + public com.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.ConfigValuesCase + getConfigValuesCase(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RevocationReason.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RevocationReason.java new file mode 100644 index 00000000..bd793207 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RevocationReason.java @@ -0,0 +1,324 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * A [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] indicates whether a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] has been revoked,
+ * and the reason for revocation. These are standard revocation reasons from RFC
+ * 5280.
+ * 
+ * + * Protobuf enum {@code google.cloud.security.privateca.v1beta1.RevocationReason} + */ +public enum RevocationReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default unspecified value. This value does indicate that a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]
+   * has been revoked, but that a reason has not been recorded.
+   * 
+ * + * REVOCATION_REASON_UNSPECIFIED = 0; + */ + REVOCATION_REASON_UNSPECIFIED(0), + /** + * + * + *
+   * Key material for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] may have leaked.
+   * 
+ * + * KEY_COMPROMISE = 1; + */ + KEY_COMPROMISE(1), + /** + * + * + *
+   * The key material for a certificate authority in the issuing path may have
+   * leaked.
+   * 
+ * + * CERTIFICATE_AUTHORITY_COMPROMISE = 2; + */ + CERTIFICATE_AUTHORITY_COMPROMISE(2), + /** + * + * + *
+   * The subject or other attributes in this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] have changed.
+   * 
+ * + * AFFILIATION_CHANGED = 3; + */ + AFFILIATION_CHANGED(3), + /** + * + * + *
+   * This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] has been superseded.
+   * 
+ * + * SUPERSEDED = 4; + */ + SUPERSEDED(4), + /** + * + * + *
+   * This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] or entities in the issuing path have ceased to
+   * operate.
+   * 
+ * + * CESSATION_OF_OPERATION = 5; + */ + CESSATION_OF_OPERATION(5), + /** + * + * + *
+   * This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] should not be considered valid, it is expected that it
+   * may become valid in the future.
+   * 
+ * + * CERTIFICATE_HOLD = 6; + */ + CERTIFICATE_HOLD(6), + /** + * + * + *
+   * This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] no longer has permission to assert the listed
+   * attributes.
+   * 
+ * + * PRIVILEGE_WITHDRAWN = 7; + */ + PRIVILEGE_WITHDRAWN(7), + /** + * + * + *
+   * The authority which determines appropriate attributes for a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]
+   * may have been compromised.
+   * 
+ * + * ATTRIBUTE_AUTHORITY_COMPROMISE = 8; + */ + ATTRIBUTE_AUTHORITY_COMPROMISE(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default unspecified value. This value does indicate that a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]
+   * has been revoked, but that a reason has not been recorded.
+   * 
+ * + * REVOCATION_REASON_UNSPECIFIED = 0; + */ + public static final int REVOCATION_REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Key material for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] may have leaked.
+   * 
+ * + * KEY_COMPROMISE = 1; + */ + public static final int KEY_COMPROMISE_VALUE = 1; + /** + * + * + *
+   * The key material for a certificate authority in the issuing path may have
+   * leaked.
+   * 
+ * + * CERTIFICATE_AUTHORITY_COMPROMISE = 2; + */ + public static final int CERTIFICATE_AUTHORITY_COMPROMISE_VALUE = 2; + /** + * + * + *
+   * The subject or other attributes in this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] have changed.
+   * 
+ * + * AFFILIATION_CHANGED = 3; + */ + public static final int AFFILIATION_CHANGED_VALUE = 3; + /** + * + * + *
+   * This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] has been superseded.
+   * 
+ * + * SUPERSEDED = 4; + */ + public static final int SUPERSEDED_VALUE = 4; + /** + * + * + *
+   * This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] or entities in the issuing path have ceased to
+   * operate.
+   * 
+ * + * CESSATION_OF_OPERATION = 5; + */ + public static final int CESSATION_OF_OPERATION_VALUE = 5; + /** + * + * + *
+   * This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] should not be considered valid, it is expected that it
+   * may become valid in the future.
+   * 
+ * + * CERTIFICATE_HOLD = 6; + */ + public static final int CERTIFICATE_HOLD_VALUE = 6; + /** + * + * + *
+   * This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] no longer has permission to assert the listed
+   * attributes.
+   * 
+ * + * PRIVILEGE_WITHDRAWN = 7; + */ + public static final int PRIVILEGE_WITHDRAWN_VALUE = 7; + /** + * + * + *
+   * The authority which determines appropriate attributes for a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]
+   * may have been compromised.
+   * 
+ * + * ATTRIBUTE_AUTHORITY_COMPROMISE = 8; + */ + public static final int ATTRIBUTE_AUTHORITY_COMPROMISE_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RevocationReason 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 RevocationReason forNumber(int value) { + switch (value) { + case 0: + return REVOCATION_REASON_UNSPECIFIED; + case 1: + return KEY_COMPROMISE; + case 2: + return CERTIFICATE_AUTHORITY_COMPROMISE; + case 3: + return AFFILIATION_CHANGED; + case 4: + return SUPERSEDED; + case 5: + return CESSATION_OF_OPERATION; + case 6: + return CERTIFICATE_HOLD; + case 7: + return PRIVILEGE_WITHDRAWN; + case 8: + return ATTRIBUTE_AUTHORITY_COMPROMISE; + 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 RevocationReason findValueByNumber(int number) { + return RevocationReason.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.security.privateca.v1beta1.PrivateCaResourcesProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RevocationReason[] VALUES = values(); + + public static RevocationReason 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 RevocationReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1beta1.RevocationReason) +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RevokeCertificateRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RevokeCertificateRequest.java new file mode 100644 index 00000000..ae381098 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RevokeCertificateRequest.java @@ -0,0 +1,1094 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.RevokeCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.RevokeCertificateRequest} + */ +public final class RevokeCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.RevokeCertificateRequest) + RevokeCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RevokeCertificateRequest.newBuilder() to construct. + private RevokeCertificateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RevokeCertificateRequest() { + name_ = ""; + reason_ = 0; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RevokeCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RevokeCertificateRequest( + 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(); + + reason_ = rawValue; + 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_RevokeCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_RevokeCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest.class, + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the
+   * format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+   * 
+ * + * + * 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 for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the
+   * format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REASON_FIELD_NUMBER = 2; + private int reason_; + /** + * + * + *
+   * Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.RevocationReason reason = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for reason. + */ + @java.lang.Override + public int getReasonValue() { + return reason_; + } + /** + * + * + *
+   * Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.RevocationReason reason = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reason. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RevocationReason getReason() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.RevocationReason result = + com.google.cloud.security.privateca.v1beta1.RevocationReason.valueOf(reason_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.RevocationReason.UNRECOGNIZED + : result; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 (reason_ + != com.google.cloud.security.privateca.v1beta1.RevocationReason + .REVOCATION_REASON_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, reason_); + } + 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 (reason_ + != com.google.cloud.security.privateca.v1beta1.RevocationReason + .REVOCATION_REASON_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, reason_); + } + 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.security.privateca.v1beta1.RevokeCertificateRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest other = + (com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (reason_ != other.reason_) 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) + REASON_FIELD_NUMBER; + hash = (53 * hash) + reason_; + 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.security.privateca.v1beta1.RevokeCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.RevokeCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.RevokeCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.RevokeCertificateRequest) + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_RevokeCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_RevokeCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest.class, + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + reason_ = 0; + + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_RevokeCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest build() { + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest buildPartial() { + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest result = + new com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest(this); + result.name_ = name_; + result.reason_ = reason_; + 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.security.privateca.v1beta1.RevokeCertificateRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.reason_ != 0) { + setReasonValue(other.getReasonValue()); + } + 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.security.privateca.v1beta1.RevokeCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the
+     * format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * + * 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 for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the
+     * format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * + * 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 for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the
+     * format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * + * 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 for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the
+     * format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * + * 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 for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the
+     * format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int reason_ = 0; + /** + * + * + *
+     * Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.RevocationReason reason = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for reason. + */ + @java.lang.Override + public int getReasonValue() { + return reason_; + } + /** + * + * + *
+     * Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.RevocationReason reason = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for reason to set. + * @return This builder for chaining. + */ + public Builder setReasonValue(int value) { + + reason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.RevocationReason reason = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reason. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RevocationReason getReason() { + @SuppressWarnings("deprecation") + com.google.cloud.security.privateca.v1beta1.RevocationReason result = + com.google.cloud.security.privateca.v1beta1.RevocationReason.valueOf(reason_); + return result == null + ? com.google.cloud.security.privateca.v1beta1.RevocationReason.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.RevocationReason reason = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The reason to set. + * @return This builder for chaining. + */ + public Builder setReason(com.google.cloud.security.privateca.v1beta1.RevocationReason value) { + if (value == null) { + throw new NullPointerException(); + } + + reason_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.RevocationReason reason = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearReason() { + + reason_ = 0; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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.security.privateca.v1beta1.RevokeCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.RevokeCertificateRequest) + private static final com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RevokeCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RevokeCertificateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RevokeCertificateRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RevokeCertificateRequestOrBuilder.java new file mode 100644 index 00000000..eb95c14e --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/RevokeCertificateRequestOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface RevokeCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.RevokeCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the
+   * format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the
+   * format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.RevocationReason reason = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for reason. + */ + int getReasonValue(); + /** + * + * + *
+   * Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.RevocationReason reason = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reason. + */ + com.google.cloud.security.privateca.v1beta1.RevocationReason getReason(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ScheduleDeleteCertificateAuthorityRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ScheduleDeleteCertificateAuthorityRequest.java new file mode 100644 index 00000000..0fad92f9 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ScheduleDeleteCertificateAuthorityRequest.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.ScheduleDeleteCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority].
+ * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest} + */ +public final class ScheduleDeleteCertificateAuthorityRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest) + ScheduleDeleteCertificateAuthorityRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ScheduleDeleteCertificateAuthorityRequest.newBuilder() to construct. + private ScheduleDeleteCertificateAuthorityRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ScheduleDeleteCertificateAuthorityRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ScheduleDeleteCertificateAuthorityRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ScheduleDeleteCertificateAuthorityRequest( + 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(); + + 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ScheduleDeleteCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ScheduleDeleteCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + .class, + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.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, 2, 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(2, 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.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest other = + (com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest) 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.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.ScheduleDeleteCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest) + com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ScheduleDeleteCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ScheduleDeleteCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + .class, + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_ScheduleDeleteCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + build() { + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest result = + new com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest( + 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.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + other) { + if (other + == com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + .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.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * 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 for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+     * format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.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.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest) + private static final com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1 + .ScheduleDeleteCertificateAuthorityRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ScheduleDeleteCertificateAuthorityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ScheduleDeleteCertificateAuthorityRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ScheduleDeleteCertificateAuthorityRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ScheduleDeleteCertificateAuthorityRequestOrBuilder.java new file mode 100644 index 00000000..cf18b5c2 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/ScheduleDeleteCertificateAuthorityRequestOrBuilder.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface ScheduleDeleteCertificateAuthorityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
+   * format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/Subject.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/Subject.java new file mode 100644 index 00000000..e039cb37 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/Subject.java @@ -0,0 +1,1712 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * [Subject][google.cloud.security.privateca.v1beta1.Subject] describes parts of a distinguished name that, in turn,
+ * describes the subject of the certificate.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.Subject} + */ +public final class Subject extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.Subject) + SubjectOrBuilder { + private static final long serialVersionUID = 0L; + // Use Subject.newBuilder() to construct. + private Subject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Subject() { + countryCode_ = ""; + organization_ = ""; + organizationalUnit_ = ""; + locality_ = ""; + province_ = ""; + streetAddress_ = ""; + postalCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Subject(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Subject( + 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(); + + countryCode_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + organization_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + organizationalUnit_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + locality_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + province_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + streetAddress_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + postalCode_ = 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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Subject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Subject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.Subject.class, + com.google.cloud.security.privateca.v1beta1.Subject.Builder.class); + } + + public static final int COUNTRY_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object countryCode_; + /** + * + * + *
+   * The country code of the subject.
+   * 
+ * + * string country_code = 1; + * + * @return The countryCode. + */ + @java.lang.Override + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + countryCode_ = s; + return s; + } + } + /** + * + * + *
+   * The country code of the subject.
+   * 
+ * + * string country_code = 1; + * + * @return The bytes for countryCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORGANIZATION_FIELD_NUMBER = 2; + private volatile java.lang.Object organization_; + /** + * + * + *
+   * The organization of the subject.
+   * 
+ * + * string organization = 2; + * + * @return The organization. + */ + @java.lang.Override + public java.lang.String getOrganization() { + java.lang.Object ref = organization_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + organization_ = s; + return s; + } + } + /** + * + * + *
+   * The organization of the subject.
+   * 
+ * + * string organization = 2; + * + * @return The bytes for organization. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrganizationBytes() { + java.lang.Object ref = organization_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + organization_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORGANIZATIONAL_UNIT_FIELD_NUMBER = 3; + private volatile java.lang.Object organizationalUnit_; + /** + * + * + *
+   * The organizational_unit of the subject.
+   * 
+ * + * string organizational_unit = 3; + * + * @return The organizationalUnit. + */ + @java.lang.Override + public java.lang.String getOrganizationalUnit() { + java.lang.Object ref = organizationalUnit_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + organizationalUnit_ = s; + return s; + } + } + /** + * + * + *
+   * The organizational_unit of the subject.
+   * 
+ * + * string organizational_unit = 3; + * + * @return The bytes for organizationalUnit. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrganizationalUnitBytes() { + java.lang.Object ref = organizationalUnit_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + organizationalUnit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCALITY_FIELD_NUMBER = 4; + private volatile java.lang.Object locality_; + /** + * + * + *
+   * The locality or city of the subject.
+   * 
+ * + * string locality = 4; + * + * @return The locality. + */ + @java.lang.Override + public java.lang.String getLocality() { + java.lang.Object ref = locality_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locality_ = s; + return s; + } + } + /** + * + * + *
+   * The locality or city of the subject.
+   * 
+ * + * string locality = 4; + * + * @return The bytes for locality. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocalityBytes() { + java.lang.Object ref = locality_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locality_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVINCE_FIELD_NUMBER = 5; + private volatile java.lang.Object province_; + /** + * + * + *
+   * The province, territory, or regional state of the subject.
+   * 
+ * + * string province = 5; + * + * @return The province. + */ + @java.lang.Override + public java.lang.String getProvince() { + java.lang.Object ref = province_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + province_ = s; + return s; + } + } + /** + * + * + *
+   * The province, territory, or regional state of the subject.
+   * 
+ * + * string province = 5; + * + * @return The bytes for province. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProvinceBytes() { + java.lang.Object ref = province_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + province_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STREET_ADDRESS_FIELD_NUMBER = 6; + private volatile java.lang.Object streetAddress_; + /** + * + * + *
+   * The street address of the subject.
+   * 
+ * + * string street_address = 6; + * + * @return The streetAddress. + */ + @java.lang.Override + public java.lang.String getStreetAddress() { + java.lang.Object ref = streetAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + streetAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The street address of the subject.
+   * 
+ * + * string street_address = 6; + * + * @return The bytes for streetAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStreetAddressBytes() { + java.lang.Object ref = streetAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + streetAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POSTAL_CODE_FIELD_NUMBER = 7; + private volatile java.lang.Object postalCode_; + /** + * + * + *
+   * The postal code of the subject.
+   * 
+ * + * string postal_code = 7; + * + * @return The postalCode. + */ + @java.lang.Override + public java.lang.String getPostalCode() { + java.lang.Object ref = postalCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postalCode_ = s; + return s; + } + } + /** + * + * + *
+   * The postal code of the subject.
+   * 
+ * + * string postal_code = 7; + * + * @return The bytes for postalCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPostalCodeBytes() { + java.lang.Object ref = postalCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postalCode_ = 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 (!getCountryCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, countryCode_); + } + if (!getOrganizationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, organization_); + } + if (!getOrganizationalUnitBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, organizationalUnit_); + } + if (!getLocalityBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locality_); + } + if (!getProvinceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, province_); + } + if (!getStreetAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, streetAddress_); + } + if (!getPostalCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, postalCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCountryCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, countryCode_); + } + if (!getOrganizationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, organization_); + } + if (!getOrganizationalUnitBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, organizationalUnit_); + } + if (!getLocalityBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locality_); + } + if (!getProvinceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, province_); + } + if (!getStreetAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, streetAddress_); + } + if (!getPostalCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, postalCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.Subject)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.Subject other = + (com.google.cloud.security.privateca.v1beta1.Subject) obj; + + if (!getCountryCode().equals(other.getCountryCode())) return false; + if (!getOrganization().equals(other.getOrganization())) return false; + if (!getOrganizationalUnit().equals(other.getOrganizationalUnit())) return false; + if (!getLocality().equals(other.getLocality())) return false; + if (!getProvince().equals(other.getProvince())) return false; + if (!getStreetAddress().equals(other.getStreetAddress())) return false; + if (!getPostalCode().equals(other.getPostalCode())) return false; + if (!unknownFields.equals(other.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) + COUNTRY_CODE_FIELD_NUMBER; + hash = (53 * hash) + getCountryCode().hashCode(); + hash = (37 * hash) + ORGANIZATION_FIELD_NUMBER; + hash = (53 * hash) + getOrganization().hashCode(); + hash = (37 * hash) + ORGANIZATIONAL_UNIT_FIELD_NUMBER; + hash = (53 * hash) + getOrganizationalUnit().hashCode(); + hash = (37 * hash) + LOCALITY_FIELD_NUMBER; + hash = (53 * hash) + getLocality().hashCode(); + hash = (37 * hash) + PROVINCE_FIELD_NUMBER; + hash = (53 * hash) + getProvince().hashCode(); + hash = (37 * hash) + STREET_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getStreetAddress().hashCode(); + hash = (37 * hash) + POSTAL_CODE_FIELD_NUMBER; + hash = (53 * hash) + getPostalCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.security.privateca.v1beta1.Subject prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * [Subject][google.cloud.security.privateca.v1beta1.Subject] describes parts of a distinguished name that, in turn,
+   * describes the subject of the certificate.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.Subject} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.Subject) + com.google.cloud.security.privateca.v1beta1.SubjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Subject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Subject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.Subject.class, + com.google.cloud.security.privateca.v1beta1.Subject.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.Subject.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + countryCode_ = ""; + + organization_ = ""; + + organizationalUnit_ = ""; + + locality_ = ""; + + province_ = ""; + + streetAddress_ = ""; + + postalCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_Subject_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Subject getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.Subject.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Subject build() { + com.google.cloud.security.privateca.v1beta1.Subject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Subject buildPartial() { + com.google.cloud.security.privateca.v1beta1.Subject result = + new com.google.cloud.security.privateca.v1beta1.Subject(this); + result.countryCode_ = countryCode_; + result.organization_ = organization_; + result.organizationalUnit_ = organizationalUnit_; + result.locality_ = locality_; + result.province_ = province_; + result.streetAddress_ = streetAddress_; + result.postalCode_ = postalCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.Subject) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.Subject) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.security.privateca.v1beta1.Subject other) { + if (other == com.google.cloud.security.privateca.v1beta1.Subject.getDefaultInstance()) + return this; + if (!other.getCountryCode().isEmpty()) { + countryCode_ = other.countryCode_; + onChanged(); + } + if (!other.getOrganization().isEmpty()) { + organization_ = other.organization_; + onChanged(); + } + if (!other.getOrganizationalUnit().isEmpty()) { + organizationalUnit_ = other.organizationalUnit_; + onChanged(); + } + if (!other.getLocality().isEmpty()) { + locality_ = other.locality_; + onChanged(); + } + if (!other.getProvince().isEmpty()) { + province_ = other.province_; + onChanged(); + } + if (!other.getStreetAddress().isEmpty()) { + streetAddress_ = other.streetAddress_; + onChanged(); + } + if (!other.getPostalCode().isEmpty()) { + postalCode_ = other.postalCode_; + 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.security.privateca.v1beta1.Subject parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.Subject) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object countryCode_ = ""; + /** + * + * + *
+     * The country code of the subject.
+     * 
+ * + * string country_code = 1; + * + * @return The countryCode. + */ + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + countryCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The country code of the subject.
+     * 
+ * + * string country_code = 1; + * + * @return The bytes for countryCode. + */ + public com.google.protobuf.ByteString getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The country code of the subject.
+     * 
+ * + * string country_code = 1; + * + * @param value The countryCode to set. + * @return This builder for chaining. + */ + public Builder setCountryCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + countryCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The country code of the subject.
+     * 
+ * + * string country_code = 1; + * + * @return This builder for chaining. + */ + public Builder clearCountryCode() { + + countryCode_ = getDefaultInstance().getCountryCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * The country code of the subject.
+     * 
+ * + * string country_code = 1; + * + * @param value The bytes for countryCode to set. + * @return This builder for chaining. + */ + public Builder setCountryCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + countryCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object organization_ = ""; + /** + * + * + *
+     * The organization of the subject.
+     * 
+ * + * string organization = 2; + * + * @return The organization. + */ + public java.lang.String getOrganization() { + java.lang.Object ref = organization_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + organization_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The organization of the subject.
+     * 
+ * + * string organization = 2; + * + * @return The bytes for organization. + */ + public com.google.protobuf.ByteString getOrganizationBytes() { + java.lang.Object ref = organization_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + organization_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The organization of the subject.
+     * 
+ * + * string organization = 2; + * + * @param value The organization to set. + * @return This builder for chaining. + */ + public Builder setOrganization(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + organization_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The organization of the subject.
+     * 
+ * + * string organization = 2; + * + * @return This builder for chaining. + */ + public Builder clearOrganization() { + + organization_ = getDefaultInstance().getOrganization(); + onChanged(); + return this; + } + /** + * + * + *
+     * The organization of the subject.
+     * 
+ * + * string organization = 2; + * + * @param value The bytes for organization to set. + * @return This builder for chaining. + */ + public Builder setOrganizationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + organization_ = value; + onChanged(); + return this; + } + + private java.lang.Object organizationalUnit_ = ""; + /** + * + * + *
+     * The organizational_unit of the subject.
+     * 
+ * + * string organizational_unit = 3; + * + * @return The organizationalUnit. + */ + public java.lang.String getOrganizationalUnit() { + java.lang.Object ref = organizationalUnit_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + organizationalUnit_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The organizational_unit of the subject.
+     * 
+ * + * string organizational_unit = 3; + * + * @return The bytes for organizationalUnit. + */ + public com.google.protobuf.ByteString getOrganizationalUnitBytes() { + java.lang.Object ref = organizationalUnit_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + organizationalUnit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The organizational_unit of the subject.
+     * 
+ * + * string organizational_unit = 3; + * + * @param value The organizationalUnit to set. + * @return This builder for chaining. + */ + public Builder setOrganizationalUnit(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + organizationalUnit_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The organizational_unit of the subject.
+     * 
+ * + * string organizational_unit = 3; + * + * @return This builder for chaining. + */ + public Builder clearOrganizationalUnit() { + + organizationalUnit_ = getDefaultInstance().getOrganizationalUnit(); + onChanged(); + return this; + } + /** + * + * + *
+     * The organizational_unit of the subject.
+     * 
+ * + * string organizational_unit = 3; + * + * @param value The bytes for organizationalUnit to set. + * @return This builder for chaining. + */ + public Builder setOrganizationalUnitBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + organizationalUnit_ = value; + onChanged(); + return this; + } + + private java.lang.Object locality_ = ""; + /** + * + * + *
+     * The locality or city of the subject.
+     * 
+ * + * string locality = 4; + * + * @return The locality. + */ + public java.lang.String getLocality() { + java.lang.Object ref = locality_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locality_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The locality or city of the subject.
+     * 
+ * + * string locality = 4; + * + * @return The bytes for locality. + */ + public com.google.protobuf.ByteString getLocalityBytes() { + java.lang.Object ref = locality_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locality_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The locality or city of the subject.
+     * 
+ * + * string locality = 4; + * + * @param value The locality to set. + * @return This builder for chaining. + */ + public Builder setLocality(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locality_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The locality or city of the subject.
+     * 
+ * + * string locality = 4; + * + * @return This builder for chaining. + */ + public Builder clearLocality() { + + locality_ = getDefaultInstance().getLocality(); + onChanged(); + return this; + } + /** + * + * + *
+     * The locality or city of the subject.
+     * 
+ * + * string locality = 4; + * + * @param value The bytes for locality to set. + * @return This builder for chaining. + */ + public Builder setLocalityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locality_ = value; + onChanged(); + return this; + } + + private java.lang.Object province_ = ""; + /** + * + * + *
+     * The province, territory, or regional state of the subject.
+     * 
+ * + * string province = 5; + * + * @return The province. + */ + public java.lang.String getProvince() { + java.lang.Object ref = province_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + province_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The province, territory, or regional state of the subject.
+     * 
+ * + * string province = 5; + * + * @return The bytes for province. + */ + public com.google.protobuf.ByteString getProvinceBytes() { + java.lang.Object ref = province_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + province_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The province, territory, or regional state of the subject.
+     * 
+ * + * string province = 5; + * + * @param value The province to set. + * @return This builder for chaining. + */ + public Builder setProvince(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + province_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The province, territory, or regional state of the subject.
+     * 
+ * + * string province = 5; + * + * @return This builder for chaining. + */ + public Builder clearProvince() { + + province_ = getDefaultInstance().getProvince(); + onChanged(); + return this; + } + /** + * + * + *
+     * The province, territory, or regional state of the subject.
+     * 
+ * + * string province = 5; + * + * @param value The bytes for province to set. + * @return This builder for chaining. + */ + public Builder setProvinceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + province_ = value; + onChanged(); + return this; + } + + private java.lang.Object streetAddress_ = ""; + /** + * + * + *
+     * The street address of the subject.
+     * 
+ * + * string street_address = 6; + * + * @return The streetAddress. + */ + public java.lang.String getStreetAddress() { + java.lang.Object ref = streetAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + streetAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The street address of the subject.
+     * 
+ * + * string street_address = 6; + * + * @return The bytes for streetAddress. + */ + public com.google.protobuf.ByteString getStreetAddressBytes() { + java.lang.Object ref = streetAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + streetAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The street address of the subject.
+     * 
+ * + * string street_address = 6; + * + * @param value The streetAddress to set. + * @return This builder for chaining. + */ + public Builder setStreetAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + streetAddress_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The street address of the subject.
+     * 
+ * + * string street_address = 6; + * + * @return This builder for chaining. + */ + public Builder clearStreetAddress() { + + streetAddress_ = getDefaultInstance().getStreetAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * The street address of the subject.
+     * 
+ * + * string street_address = 6; + * + * @param value The bytes for streetAddress to set. + * @return This builder for chaining. + */ + public Builder setStreetAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + streetAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object postalCode_ = ""; + /** + * + * + *
+     * The postal code of the subject.
+     * 
+ * + * string postal_code = 7; + * + * @return The postalCode. + */ + public java.lang.String getPostalCode() { + java.lang.Object ref = postalCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postalCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The postal code of the subject.
+     * 
+ * + * string postal_code = 7; + * + * @return The bytes for postalCode. + */ + public com.google.protobuf.ByteString getPostalCodeBytes() { + java.lang.Object ref = postalCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postalCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The postal code of the subject.
+     * 
+ * + * string postal_code = 7; + * + * @param value The postalCode to set. + * @return This builder for chaining. + */ + public Builder setPostalCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + postalCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The postal code of the subject.
+     * 
+ * + * string postal_code = 7; + * + * @return This builder for chaining. + */ + public Builder clearPostalCode() { + + postalCode_ = getDefaultInstance().getPostalCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * The postal code of the subject.
+     * 
+ * + * string postal_code = 7; + * + * @param value The bytes for postalCode to set. + * @return This builder for chaining. + */ + public Builder setPostalCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + postalCode_ = 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.security.privateca.v1beta1.Subject) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.Subject) + private static final com.google.cloud.security.privateca.v1beta1.Subject DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.Subject(); + } + + public static com.google.cloud.security.privateca.v1beta1.Subject getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Subject parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Subject(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Subject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubjectAltNames.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubjectAltNames.java new file mode 100644 index 00000000..da393930 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubjectAltNames.java @@ -0,0 +1,2081 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] corresponds to a more modern way of listing what
+ * the asserted identity is in a certificate (i.e., compared to the "common
+ * name" in the distinguished name).
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.SubjectAltNames} + */ +public final class SubjectAltNames extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.SubjectAltNames) + SubjectAltNamesOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubjectAltNames.newBuilder() to construct. + private SubjectAltNames(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubjectAltNames() { + dnsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + emailAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + customSans_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubjectAltNames(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SubjectAltNames( + 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)) { + dnsNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dnsNames_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + uris_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + uris_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + emailAddresses_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + emailAddresses_.add(s); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + ipAddresses_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + ipAddresses_.add(s); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + customSans_ = + new java.util.ArrayList< + com.google.cloud.security.privateca.v1beta1.X509Extension>(); + mutable_bitField0_ |= 0x00000010; + } + customSans_.add( + input.readMessage( + com.google.cloud.security.privateca.v1beta1.X509Extension.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)) { + dnsNames_ = dnsNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + uris_ = uris_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + emailAddresses_ = emailAddresses_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + ipAddresses_ = ipAddresses_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + customSans_ = java.util.Collections.unmodifiableList(customSans_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubjectAltNames_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubjectAltNames_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.class, + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder.class); + } + + public static final int DNS_NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList dnsNames_; + /** + * + * + *
+   * Contains only valid, fully-qualified host names.
+   * 
+ * + * repeated string dns_names = 1; + * + * @return A list containing the dnsNames. + */ + public com.google.protobuf.ProtocolStringList getDnsNamesList() { + return dnsNames_; + } + /** + * + * + *
+   * Contains only valid, fully-qualified host names.
+   * 
+ * + * repeated string dns_names = 1; + * + * @return The count of dnsNames. + */ + public int getDnsNamesCount() { + return dnsNames_.size(); + } + /** + * + * + *
+   * Contains only valid, fully-qualified host names.
+   * 
+ * + * repeated string dns_names = 1; + * + * @param index The index of the element to return. + * @return The dnsNames at the given index. + */ + public java.lang.String getDnsNames(int index) { + return dnsNames_.get(index); + } + /** + * + * + *
+   * Contains only valid, fully-qualified host names.
+   * 
+ * + * repeated string dns_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the dnsNames at the given index. + */ + public com.google.protobuf.ByteString getDnsNamesBytes(int index) { + return dnsNames_.getByteString(index); + } + + public static final int URIS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList uris_; + /** + * + * + *
+   * Contains only valid RFC 3986 URIs.
+   * 
+ * + * repeated string uris = 2; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + return uris_; + } + /** + * + * + *
+   * Contains only valid RFC 3986 URIs.
+   * 
+ * + * repeated string uris = 2; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+   * Contains only valid RFC 3986 URIs.
+   * 
+ * + * repeated string uris = 2; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+   * Contains only valid RFC 3986 URIs.
+   * 
+ * + * repeated string uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + + public static final int EMAIL_ADDRESSES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList emailAddresses_; + /** + * + * + *
+   * Contains only valid RFC 2822 E-mail addresses.
+   * 
+ * + * repeated string email_addresses = 3; + * + * @return A list containing the emailAddresses. + */ + public com.google.protobuf.ProtocolStringList getEmailAddressesList() { + return emailAddresses_; + } + /** + * + * + *
+   * Contains only valid RFC 2822 E-mail addresses.
+   * 
+ * + * repeated string email_addresses = 3; + * + * @return The count of emailAddresses. + */ + public int getEmailAddressesCount() { + return emailAddresses_.size(); + } + /** + * + * + *
+   * Contains only valid RFC 2822 E-mail addresses.
+   * 
+ * + * repeated string email_addresses = 3; + * + * @param index The index of the element to return. + * @return The emailAddresses at the given index. + */ + public java.lang.String getEmailAddresses(int index) { + return emailAddresses_.get(index); + } + /** + * + * + *
+   * Contains only valid RFC 2822 E-mail addresses.
+   * 
+ * + * repeated string email_addresses = 3; + * + * @param index The index of the value to return. + * @return The bytes of the emailAddresses at the given index. + */ + public com.google.protobuf.ByteString getEmailAddressesBytes(int index) { + return emailAddresses_.getByteString(index); + } + + public static final int IP_ADDRESSES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList ipAddresses_; + /** + * + * + *
+   * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+   * 
+ * + * repeated string ip_addresses = 4; + * + * @return A list containing the ipAddresses. + */ + public com.google.protobuf.ProtocolStringList getIpAddressesList() { + return ipAddresses_; + } + /** + * + * + *
+   * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+   * 
+ * + * repeated string ip_addresses = 4; + * + * @return The count of ipAddresses. + */ + public int getIpAddressesCount() { + return ipAddresses_.size(); + } + /** + * + * + *
+   * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+   * 
+ * + * repeated string ip_addresses = 4; + * + * @param index The index of the element to return. + * @return The ipAddresses at the given index. + */ + public java.lang.String getIpAddresses(int index) { + return ipAddresses_.get(index); + } + /** + * + * + *
+   * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+   * 
+ * + * repeated string ip_addresses = 4; + * + * @param index The index of the value to return. + * @return The bytes of the ipAddresses at the given index. + */ + public com.google.protobuf.ByteString getIpAddressesBytes(int index) { + return ipAddresses_.getByteString(index); + } + + public static final int CUSTOM_SANS_FIELD_NUMBER = 5; + private java.util.List customSans_; + /** + * + * + *
+   * Contains additional subject alternative name values.
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + @java.lang.Override + public java.util.List + getCustomSansList() { + return customSans_; + } + /** + * + * + *
+   * Contains additional subject alternative name values.
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder> + getCustomSansOrBuilderList() { + return customSans_; + } + /** + * + * + *
+   * Contains additional subject alternative name values.
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + @java.lang.Override + public int getCustomSansCount() { + return customSans_.size(); + } + /** + * + * + *
+   * Contains additional subject alternative name values.
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.X509Extension getCustomSans(int index) { + return customSans_.get(index); + } + /** + * + * + *
+   * Contains additional subject alternative name values.
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder getCustomSansOrBuilder( + int index) { + return customSans_.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 < dnsNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dnsNames_.getRaw(i)); + } + for (int i = 0; i < uris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uris_.getRaw(i)); + } + for (int i = 0; i < emailAddresses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, emailAddresses_.getRaw(i)); + } + for (int i = 0; i < ipAddresses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ipAddresses_.getRaw(i)); + } + for (int i = 0; i < customSans_.size(); i++) { + output.writeMessage(5, customSans_.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 < dnsNames_.size(); i++) { + dataSize += computeStringSizeNoTag(dnsNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getDnsNamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < uris_.size(); i++) { + dataSize += computeStringSizeNoTag(uris_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrisList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < emailAddresses_.size(); i++) { + dataSize += computeStringSizeNoTag(emailAddresses_.getRaw(i)); + } + size += dataSize; + size += 1 * getEmailAddressesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < ipAddresses_.size(); i++) { + dataSize += computeStringSizeNoTag(ipAddresses_.getRaw(i)); + } + size += dataSize; + size += 1 * getIpAddressesList().size(); + } + for (int i = 0; i < customSans_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, customSans_.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.security.privateca.v1beta1.SubjectAltNames)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.SubjectAltNames other = + (com.google.cloud.security.privateca.v1beta1.SubjectAltNames) obj; + + if (!getDnsNamesList().equals(other.getDnsNamesList())) return false; + if (!getUrisList().equals(other.getUrisList())) return false; + if (!getEmailAddressesList().equals(other.getEmailAddressesList())) return false; + if (!getIpAddressesList().equals(other.getIpAddressesList())) return false; + if (!getCustomSansList().equals(other.getCustomSansList())) return false; + if (!unknownFields.equals(other.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 (getDnsNamesCount() > 0) { + hash = (37 * hash) + DNS_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getDnsNamesList().hashCode(); + } + if (getUrisCount() > 0) { + hash = (37 * hash) + URIS_FIELD_NUMBER; + hash = (53 * hash) + getUrisList().hashCode(); + } + if (getEmailAddressesCount() > 0) { + hash = (37 * hash) + EMAIL_ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + getEmailAddressesList().hashCode(); + } + if (getIpAddressesCount() > 0) { + hash = (37 * hash) + IP_ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + getIpAddressesList().hashCode(); + } + if (getCustomSansCount() > 0) { + hash = (37 * hash) + CUSTOM_SANS_FIELD_NUMBER; + hash = (53 * hash) + getCustomSansList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.SubjectAltNames prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] corresponds to a more modern way of listing what
+   * the asserted identity is in a certificate (i.e., compared to the "common
+   * name" in the distinguished name).
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.SubjectAltNames} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.SubjectAltNames) + com.google.cloud.security.privateca.v1beta1.SubjectAltNamesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubjectAltNames_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubjectAltNames_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.class, + com.google.cloud.security.privateca.v1beta1.SubjectAltNames.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.SubjectAltNames.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCustomSansFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dnsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + emailAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (customSansBuilder_ == null) { + customSans_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + customSansBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubjectAltNames_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubjectAltNames getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.SubjectAltNames.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubjectAltNames build() { + com.google.cloud.security.privateca.v1beta1.SubjectAltNames result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubjectAltNames buildPartial() { + com.google.cloud.security.privateca.v1beta1.SubjectAltNames result = + new com.google.cloud.security.privateca.v1beta1.SubjectAltNames(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + dnsNames_ = dnsNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dnsNames_ = dnsNames_; + if (((bitField0_ & 0x00000002) != 0)) { + uris_ = uris_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.uris_ = uris_; + if (((bitField0_ & 0x00000004) != 0)) { + emailAddresses_ = emailAddresses_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.emailAddresses_ = emailAddresses_; + if (((bitField0_ & 0x00000008) != 0)) { + ipAddresses_ = ipAddresses_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.ipAddresses_ = ipAddresses_; + if (customSansBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + customSans_ = java.util.Collections.unmodifiableList(customSans_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.customSans_ = customSans_; + } else { + result.customSans_ = customSansBuilder_.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.security.privateca.v1beta1.SubjectAltNames) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.SubjectAltNames) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.security.privateca.v1beta1.SubjectAltNames other) { + if (other == com.google.cloud.security.privateca.v1beta1.SubjectAltNames.getDefaultInstance()) + return this; + if (!other.dnsNames_.isEmpty()) { + if (dnsNames_.isEmpty()) { + dnsNames_ = other.dnsNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDnsNamesIsMutable(); + dnsNames_.addAll(other.dnsNames_); + } + onChanged(); + } + if (!other.uris_.isEmpty()) { + if (uris_.isEmpty()) { + uris_ = other.uris_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUrisIsMutable(); + uris_.addAll(other.uris_); + } + onChanged(); + } + if (!other.emailAddresses_.isEmpty()) { + if (emailAddresses_.isEmpty()) { + emailAddresses_ = other.emailAddresses_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureEmailAddressesIsMutable(); + emailAddresses_.addAll(other.emailAddresses_); + } + onChanged(); + } + if (!other.ipAddresses_.isEmpty()) { + if (ipAddresses_.isEmpty()) { + ipAddresses_ = other.ipAddresses_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureIpAddressesIsMutable(); + ipAddresses_.addAll(other.ipAddresses_); + } + onChanged(); + } + if (customSansBuilder_ == null) { + if (!other.customSans_.isEmpty()) { + if (customSans_.isEmpty()) { + customSans_ = other.customSans_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureCustomSansIsMutable(); + customSans_.addAll(other.customSans_); + } + onChanged(); + } + } else { + if (!other.customSans_.isEmpty()) { + if (customSansBuilder_.isEmpty()) { + customSansBuilder_.dispose(); + customSansBuilder_ = null; + customSans_ = other.customSans_; + bitField0_ = (bitField0_ & ~0x00000010); + customSansBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCustomSansFieldBuilder() + : null; + } else { + customSansBuilder_.addAllMessages(other.customSans_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.SubjectAltNames parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.SubjectAltNames) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList dnsNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDnsNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dnsNames_ = new com.google.protobuf.LazyStringArrayList(dnsNames_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Contains only valid, fully-qualified host names.
+     * 
+ * + * repeated string dns_names = 1; + * + * @return A list containing the dnsNames. + */ + public com.google.protobuf.ProtocolStringList getDnsNamesList() { + return dnsNames_.getUnmodifiableView(); + } + /** + * + * + *
+     * Contains only valid, fully-qualified host names.
+     * 
+ * + * repeated string dns_names = 1; + * + * @return The count of dnsNames. + */ + public int getDnsNamesCount() { + return dnsNames_.size(); + } + /** + * + * + *
+     * Contains only valid, fully-qualified host names.
+     * 
+ * + * repeated string dns_names = 1; + * + * @param index The index of the element to return. + * @return The dnsNames at the given index. + */ + public java.lang.String getDnsNames(int index) { + return dnsNames_.get(index); + } + /** + * + * + *
+     * Contains only valid, fully-qualified host names.
+     * 
+ * + * repeated string dns_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the dnsNames at the given index. + */ + public com.google.protobuf.ByteString getDnsNamesBytes(int index) { + return dnsNames_.getByteString(index); + } + /** + * + * + *
+     * Contains only valid, fully-qualified host names.
+     * 
+ * + * repeated string dns_names = 1; + * + * @param index The index to set the value at. + * @param value The dnsNames to set. + * @return This builder for chaining. + */ + public Builder setDnsNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDnsNamesIsMutable(); + dnsNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid, fully-qualified host names.
+     * 
+ * + * repeated string dns_names = 1; + * + * @param value The dnsNames to add. + * @return This builder for chaining. + */ + public Builder addDnsNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDnsNamesIsMutable(); + dnsNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid, fully-qualified host names.
+     * 
+ * + * repeated string dns_names = 1; + * + * @param values The dnsNames to add. + * @return This builder for chaining. + */ + public Builder addAllDnsNames(java.lang.Iterable values) { + ensureDnsNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dnsNames_); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid, fully-qualified host names.
+     * 
+ * + * repeated string dns_names = 1; + * + * @return This builder for chaining. + */ + public Builder clearDnsNames() { + dnsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid, fully-qualified host names.
+     * 
+ * + * repeated string dns_names = 1; + * + * @param value The bytes of the dnsNames to add. + * @return This builder for chaining. + */ + public Builder addDnsNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDnsNamesIsMutable(); + dnsNames_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList uris_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUrisIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + uris_ = new com.google.protobuf.LazyStringArrayList(uris_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Contains only valid RFC 3986 URIs.
+     * 
+ * + * repeated string uris = 2; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + return uris_.getUnmodifiableView(); + } + /** + * + * + *
+     * Contains only valid RFC 3986 URIs.
+     * 
+ * + * repeated string uris = 2; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+     * Contains only valid RFC 3986 URIs.
+     * 
+ * + * repeated string uris = 2; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+     * Contains only valid RFC 3986 URIs.
+     * 
+ * + * repeated string uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + /** + * + * + *
+     * Contains only valid RFC 3986 URIs.
+     * 
+ * + * repeated string uris = 2; + * + * @param index The index to set the value at. + * @param value The uris to set. + * @return This builder for chaining. + */ + public Builder setUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid RFC 3986 URIs.
+     * 
+ * + * repeated string uris = 2; + * + * @param value The uris to add. + * @return This builder for chaining. + */ + public Builder addUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid RFC 3986 URIs.
+     * 
+ * + * repeated string uris = 2; + * + * @param values The uris to add. + * @return This builder for chaining. + */ + public Builder addAllUris(java.lang.Iterable values) { + ensureUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uris_); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid RFC 3986 URIs.
+     * 
+ * + * repeated string uris = 2; + * + * @return This builder for chaining. + */ + public Builder clearUris() { + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid RFC 3986 URIs.
+     * 
+ * + * repeated string uris = 2; + * + * @param value The bytes of the uris to add. + * @return This builder for chaining. + */ + public Builder addUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUrisIsMutable(); + uris_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList emailAddresses_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureEmailAddressesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + emailAddresses_ = new com.google.protobuf.LazyStringArrayList(emailAddresses_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Contains only valid RFC 2822 E-mail addresses.
+     * 
+ * + * repeated string email_addresses = 3; + * + * @return A list containing the emailAddresses. + */ + public com.google.protobuf.ProtocolStringList getEmailAddressesList() { + return emailAddresses_.getUnmodifiableView(); + } + /** + * + * + *
+     * Contains only valid RFC 2822 E-mail addresses.
+     * 
+ * + * repeated string email_addresses = 3; + * + * @return The count of emailAddresses. + */ + public int getEmailAddressesCount() { + return emailAddresses_.size(); + } + /** + * + * + *
+     * Contains only valid RFC 2822 E-mail addresses.
+     * 
+ * + * repeated string email_addresses = 3; + * + * @param index The index of the element to return. + * @return The emailAddresses at the given index. + */ + public java.lang.String getEmailAddresses(int index) { + return emailAddresses_.get(index); + } + /** + * + * + *
+     * Contains only valid RFC 2822 E-mail addresses.
+     * 
+ * + * repeated string email_addresses = 3; + * + * @param index The index of the value to return. + * @return The bytes of the emailAddresses at the given index. + */ + public com.google.protobuf.ByteString getEmailAddressesBytes(int index) { + return emailAddresses_.getByteString(index); + } + /** + * + * + *
+     * Contains only valid RFC 2822 E-mail addresses.
+     * 
+ * + * repeated string email_addresses = 3; + * + * @param index The index to set the value at. + * @param value The emailAddresses to set. + * @return This builder for chaining. + */ + public Builder setEmailAddresses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmailAddressesIsMutable(); + emailAddresses_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid RFC 2822 E-mail addresses.
+     * 
+ * + * repeated string email_addresses = 3; + * + * @param value The emailAddresses to add. + * @return This builder for chaining. + */ + public Builder addEmailAddresses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmailAddressesIsMutable(); + emailAddresses_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid RFC 2822 E-mail addresses.
+     * 
+ * + * repeated string email_addresses = 3; + * + * @param values The emailAddresses to add. + * @return This builder for chaining. + */ + public Builder addAllEmailAddresses(java.lang.Iterable values) { + ensureEmailAddressesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, emailAddresses_); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid RFC 2822 E-mail addresses.
+     * 
+ * + * repeated string email_addresses = 3; + * + * @return This builder for chaining. + */ + public Builder clearEmailAddresses() { + emailAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid RFC 2822 E-mail addresses.
+     * 
+ * + * repeated string email_addresses = 3; + * + * @param value The bytes of the emailAddresses to add. + * @return This builder for chaining. + */ + public Builder addEmailAddressesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEmailAddressesIsMutable(); + emailAddresses_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList ipAddresses_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureIpAddressesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + ipAddresses_ = new com.google.protobuf.LazyStringArrayList(ipAddresses_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+     * 
+ * + * repeated string ip_addresses = 4; + * + * @return A list containing the ipAddresses. + */ + public com.google.protobuf.ProtocolStringList getIpAddressesList() { + return ipAddresses_.getUnmodifiableView(); + } + /** + * + * + *
+     * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+     * 
+ * + * repeated string ip_addresses = 4; + * + * @return The count of ipAddresses. + */ + public int getIpAddressesCount() { + return ipAddresses_.size(); + } + /** + * + * + *
+     * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+     * 
+ * + * repeated string ip_addresses = 4; + * + * @param index The index of the element to return. + * @return The ipAddresses at the given index. + */ + public java.lang.String getIpAddresses(int index) { + return ipAddresses_.get(index); + } + /** + * + * + *
+     * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+     * 
+ * + * repeated string ip_addresses = 4; + * + * @param index The index of the value to return. + * @return The bytes of the ipAddresses at the given index. + */ + public com.google.protobuf.ByteString getIpAddressesBytes(int index) { + return ipAddresses_.getByteString(index); + } + /** + * + * + *
+     * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+     * 
+ * + * repeated string ip_addresses = 4; + * + * @param index The index to set the value at. + * @param value The ipAddresses to set. + * @return This builder for chaining. + */ + public Builder setIpAddresses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpAddressesIsMutable(); + ipAddresses_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+     * 
+ * + * repeated string ip_addresses = 4; + * + * @param value The ipAddresses to add. + * @return This builder for chaining. + */ + public Builder addIpAddresses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpAddressesIsMutable(); + ipAddresses_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+     * 
+ * + * repeated string ip_addresses = 4; + * + * @param values The ipAddresses to add. + * @return This builder for chaining. + */ + public Builder addAllIpAddresses(java.lang.Iterable values) { + ensureIpAddressesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ipAddresses_); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+     * 
+ * + * repeated string ip_addresses = 4; + * + * @return This builder for chaining. + */ + public Builder clearIpAddresses() { + ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+     * 
+ * + * repeated string ip_addresses = 4; + * + * @param value The bytes of the ipAddresses to add. + * @return This builder for chaining. + */ + public Builder addIpAddressesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIpAddressesIsMutable(); + ipAddresses_.add(value); + onChanged(); + return this; + } + + private java.util.List customSans_ = + java.util.Collections.emptyList(); + + private void ensureCustomSansIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + customSans_ = + new java.util.ArrayList( + customSans_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.X509Extension, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder, + com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder> + customSansBuilder_; + + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public java.util.List + getCustomSansList() { + if (customSansBuilder_ == null) { + return java.util.Collections.unmodifiableList(customSans_); + } else { + return customSansBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public int getCustomSansCount() { + if (customSansBuilder_ == null) { + return customSans_.size(); + } else { + return customSansBuilder_.getCount(); + } + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public com.google.cloud.security.privateca.v1beta1.X509Extension getCustomSans(int index) { + if (customSansBuilder_ == null) { + return customSans_.get(index); + } else { + return customSansBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public Builder setCustomSans( + int index, com.google.cloud.security.privateca.v1beta1.X509Extension value) { + if (customSansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomSansIsMutable(); + customSans_.set(index, value); + onChanged(); + } else { + customSansBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public Builder setCustomSans( + int index, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder builderForValue) { + if (customSansBuilder_ == null) { + ensureCustomSansIsMutable(); + customSans_.set(index, builderForValue.build()); + onChanged(); + } else { + customSansBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public Builder addCustomSans(com.google.cloud.security.privateca.v1beta1.X509Extension value) { + if (customSansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomSansIsMutable(); + customSans_.add(value); + onChanged(); + } else { + customSansBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public Builder addCustomSans( + int index, com.google.cloud.security.privateca.v1beta1.X509Extension value) { + if (customSansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomSansIsMutable(); + customSans_.add(index, value); + onChanged(); + } else { + customSansBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public Builder addCustomSans( + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder builderForValue) { + if (customSansBuilder_ == null) { + ensureCustomSansIsMutable(); + customSans_.add(builderForValue.build()); + onChanged(); + } else { + customSansBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public Builder addCustomSans( + int index, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder builderForValue) { + if (customSansBuilder_ == null) { + ensureCustomSansIsMutable(); + customSans_.add(index, builderForValue.build()); + onChanged(); + } else { + customSansBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public Builder addAllCustomSans( + java.lang.Iterable + values) { + if (customSansBuilder_ == null) { + ensureCustomSansIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, customSans_); + onChanged(); + } else { + customSansBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public Builder clearCustomSans() { + if (customSansBuilder_ == null) { + customSans_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + customSansBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public Builder removeCustomSans(int index) { + if (customSansBuilder_ == null) { + ensureCustomSansIsMutable(); + customSans_.remove(index); + onChanged(); + } else { + customSansBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public com.google.cloud.security.privateca.v1beta1.X509Extension.Builder getCustomSansBuilder( + int index) { + return getCustomSansFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder + getCustomSansOrBuilder(int index) { + if (customSansBuilder_ == null) { + return customSans_.get(index); + } else { + return customSansBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public java.util.List< + ? extends com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder> + getCustomSansOrBuilderList() { + if (customSansBuilder_ != null) { + return customSansBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(customSans_); + } + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public com.google.cloud.security.privateca.v1beta1.X509Extension.Builder + addCustomSansBuilder() { + return getCustomSansFieldBuilder() + .addBuilder( + com.google.cloud.security.privateca.v1beta1.X509Extension.getDefaultInstance()); + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public com.google.cloud.security.privateca.v1beta1.X509Extension.Builder addCustomSansBuilder( + int index) { + return getCustomSansFieldBuilder() + .addBuilder( + index, + com.google.cloud.security.privateca.v1beta1.X509Extension.getDefaultInstance()); + } + /** + * + * + *
+     * Contains additional subject alternative name values.
+     * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + public java.util.List + getCustomSansBuilderList() { + return getCustomSansFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.X509Extension, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder, + com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder> + getCustomSansFieldBuilder() { + if (customSansBuilder_ == null) { + customSansBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.X509Extension, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder, + com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder>( + customSans_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + customSans_ = null; + } + return customSansBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.SubjectAltNames) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.SubjectAltNames) + private static final com.google.cloud.security.privateca.v1beta1.SubjectAltNames DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.SubjectAltNames(); + } + + public static com.google.cloud.security.privateca.v1beta1.SubjectAltNames getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectAltNames parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SubjectAltNames(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubjectAltNames getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubjectAltNamesOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubjectAltNamesOrBuilder.java new file mode 100644 index 00000000..d92584f6 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubjectAltNamesOrBuilder.java @@ -0,0 +1,282 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface SubjectAltNamesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.SubjectAltNames) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Contains only valid, fully-qualified host names.
+   * 
+ * + * repeated string dns_names = 1; + * + * @return A list containing the dnsNames. + */ + java.util.List getDnsNamesList(); + /** + * + * + *
+   * Contains only valid, fully-qualified host names.
+   * 
+ * + * repeated string dns_names = 1; + * + * @return The count of dnsNames. + */ + int getDnsNamesCount(); + /** + * + * + *
+   * Contains only valid, fully-qualified host names.
+   * 
+ * + * repeated string dns_names = 1; + * + * @param index The index of the element to return. + * @return The dnsNames at the given index. + */ + java.lang.String getDnsNames(int index); + /** + * + * + *
+   * Contains only valid, fully-qualified host names.
+   * 
+ * + * repeated string dns_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the dnsNames at the given index. + */ + com.google.protobuf.ByteString getDnsNamesBytes(int index); + + /** + * + * + *
+   * Contains only valid RFC 3986 URIs.
+   * 
+ * + * repeated string uris = 2; + * + * @return A list containing the uris. + */ + java.util.List getUrisList(); + /** + * + * + *
+   * Contains only valid RFC 3986 URIs.
+   * 
+ * + * repeated string uris = 2; + * + * @return The count of uris. + */ + int getUrisCount(); + /** + * + * + *
+   * Contains only valid RFC 3986 URIs.
+   * 
+ * + * repeated string uris = 2; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + java.lang.String getUris(int index); + /** + * + * + *
+   * Contains only valid RFC 3986 URIs.
+   * 
+ * + * repeated string uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + com.google.protobuf.ByteString getUrisBytes(int index); + + /** + * + * + *
+   * Contains only valid RFC 2822 E-mail addresses.
+   * 
+ * + * repeated string email_addresses = 3; + * + * @return A list containing the emailAddresses. + */ + java.util.List getEmailAddressesList(); + /** + * + * + *
+   * Contains only valid RFC 2822 E-mail addresses.
+   * 
+ * + * repeated string email_addresses = 3; + * + * @return The count of emailAddresses. + */ + int getEmailAddressesCount(); + /** + * + * + *
+   * Contains only valid RFC 2822 E-mail addresses.
+   * 
+ * + * repeated string email_addresses = 3; + * + * @param index The index of the element to return. + * @return The emailAddresses at the given index. + */ + java.lang.String getEmailAddresses(int index); + /** + * + * + *
+   * Contains only valid RFC 2822 E-mail addresses.
+   * 
+ * + * repeated string email_addresses = 3; + * + * @param index The index of the value to return. + * @return The bytes of the emailAddresses at the given index. + */ + com.google.protobuf.ByteString getEmailAddressesBytes(int index); + + /** + * + * + *
+   * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+   * 
+ * + * repeated string ip_addresses = 4; + * + * @return A list containing the ipAddresses. + */ + java.util.List getIpAddressesList(); + /** + * + * + *
+   * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+   * 
+ * + * repeated string ip_addresses = 4; + * + * @return The count of ipAddresses. + */ + int getIpAddressesCount(); + /** + * + * + *
+   * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+   * 
+ * + * repeated string ip_addresses = 4; + * + * @param index The index of the element to return. + * @return The ipAddresses at the given index. + */ + java.lang.String getIpAddresses(int index); + /** + * + * + *
+   * Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
+   * 
+ * + * repeated string ip_addresses = 4; + * + * @param index The index of the value to return. + * @return The bytes of the ipAddresses at the given index. + */ + com.google.protobuf.ByteString getIpAddressesBytes(int index); + + /** + * + * + *
+   * Contains additional subject alternative name values.
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + java.util.List getCustomSansList(); + /** + * + * + *
+   * Contains additional subject alternative name values.
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + com.google.cloud.security.privateca.v1beta1.X509Extension getCustomSans(int index); + /** + * + * + *
+   * Contains additional subject alternative name values.
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + int getCustomSansCount(); + /** + * + * + *
+   * Contains additional subject alternative name values.
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + java.util.List + getCustomSansOrBuilderList(); + /** + * + * + *
+   * Contains additional subject alternative name values.
+   * 
+ * + * repeated .google.cloud.security.privateca.v1beta1.X509Extension custom_sans = 5; + */ + com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder getCustomSansOrBuilder( + int index); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubjectOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubjectOrBuilder.java new file mode 100644 index 00000000..f989da9f --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubjectOrBuilder.java @@ -0,0 +1,200 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface SubjectOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.Subject) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The country code of the subject.
+   * 
+ * + * string country_code = 1; + * + * @return The countryCode. + */ + java.lang.String getCountryCode(); + /** + * + * + *
+   * The country code of the subject.
+   * 
+ * + * string country_code = 1; + * + * @return The bytes for countryCode. + */ + com.google.protobuf.ByteString getCountryCodeBytes(); + + /** + * + * + *
+   * The organization of the subject.
+   * 
+ * + * string organization = 2; + * + * @return The organization. + */ + java.lang.String getOrganization(); + /** + * + * + *
+   * The organization of the subject.
+   * 
+ * + * string organization = 2; + * + * @return The bytes for organization. + */ + com.google.protobuf.ByteString getOrganizationBytes(); + + /** + * + * + *
+   * The organizational_unit of the subject.
+   * 
+ * + * string organizational_unit = 3; + * + * @return The organizationalUnit. + */ + java.lang.String getOrganizationalUnit(); + /** + * + * + *
+   * The organizational_unit of the subject.
+   * 
+ * + * string organizational_unit = 3; + * + * @return The bytes for organizationalUnit. + */ + com.google.protobuf.ByteString getOrganizationalUnitBytes(); + + /** + * + * + *
+   * The locality or city of the subject.
+   * 
+ * + * string locality = 4; + * + * @return The locality. + */ + java.lang.String getLocality(); + /** + * + * + *
+   * The locality or city of the subject.
+   * 
+ * + * string locality = 4; + * + * @return The bytes for locality. + */ + com.google.protobuf.ByteString getLocalityBytes(); + + /** + * + * + *
+   * The province, territory, or regional state of the subject.
+   * 
+ * + * string province = 5; + * + * @return The province. + */ + java.lang.String getProvince(); + /** + * + * + *
+   * The province, territory, or regional state of the subject.
+   * 
+ * + * string province = 5; + * + * @return The bytes for province. + */ + com.google.protobuf.ByteString getProvinceBytes(); + + /** + * + * + *
+   * The street address of the subject.
+   * 
+ * + * string street_address = 6; + * + * @return The streetAddress. + */ + java.lang.String getStreetAddress(); + /** + * + * + *
+   * The street address of the subject.
+   * 
+ * + * string street_address = 6; + * + * @return The bytes for streetAddress. + */ + com.google.protobuf.ByteString getStreetAddressBytes(); + + /** + * + * + *
+   * The postal code of the subject.
+   * 
+ * + * string postal_code = 7; + * + * @return The postalCode. + */ + java.lang.String getPostalCode(); + /** + * + * + *
+   * The postal code of the subject.
+   * 
+ * + * string postal_code = 7; + * + * @return The bytes for postalCode. + */ + com.google.protobuf.ByteString getPostalCodeBytes(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubordinateConfig.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubordinateConfig.java new file mode 100644 index 00000000..d3a93822 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubordinateConfig.java @@ -0,0 +1,2007 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Describes a subordinate CA's issuers. This is either a resource path to a
+ * known issuing [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], or a PEM issuer certificate chain.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.SubordinateConfig} + */ +public final class SubordinateConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.SubordinateConfig) + SubordinateConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubordinateConfig.newBuilder() to construct. + private SubordinateConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubordinateConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubordinateConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SubordinateConfig( + 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(); + subordinateConfigCase_ = 1; + subordinateConfig_ = s; + break; + } + case 18: + { + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .Builder + subBuilder = null; + if (subordinateConfigCase_ == 2) { + subBuilder = + ((com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain) + subordinateConfig_) + .toBuilder(); + } + subordinateConfig_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain) + subordinateConfig_); + subordinateConfig_ = subBuilder.buildPartial(); + } + subordinateConfigCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.class, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder.class); + } + + public interface SubordinateConfigChainOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Expected to be in leaf-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the pemCertificates. + */ + java.util.List getPemCertificatesList(); + /** + * + * + *
+     * Required. Expected to be in leaf-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of pemCertificates. + */ + int getPemCertificatesCount(); + /** + * + * + *
+     * Required. Expected to be in leaf-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The pemCertificates at the given index. + */ + java.lang.String getPemCertificates(int index); + /** + * + * + *
+     * Required. Expected to be in leaf-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the pemCertificates at the given index. + */ + com.google.protobuf.ByteString getPemCertificatesBytes(int index); + } + /** + * + * + *
+   * This message describes a subordinate CA's issuer certificate chain. This
+   * wrapper exists for compatibility reasons.
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain} + */ + public static final class SubordinateConfigChain extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + SubordinateConfigChainOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubordinateConfigChain.newBuilder() to construct. + private SubordinateConfigChain(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubordinateConfigChain() { + pemCertificates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubordinateConfigChain(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SubordinateConfigChain( + 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)) { + pemCertificates_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pemCertificates_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pemCertificates_ = pemCertificates_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_SubordinateConfigChain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_SubordinateConfigChain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .class, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .Builder.class); + } + + public static final int PEM_CERTIFICATES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList pemCertificates_; + /** + * + * + *
+     * Required. Expected to be in leaf-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the pemCertificates. + */ + public com.google.protobuf.ProtocolStringList getPemCertificatesList() { + return pemCertificates_; + } + /** + * + * + *
+     * Required. Expected to be in leaf-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of pemCertificates. + */ + public int getPemCertificatesCount() { + return pemCertificates_.size(); + } + /** + * + * + *
+     * Required. Expected to be in leaf-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The pemCertificates at the given index. + */ + public java.lang.String getPemCertificates(int index) { + return pemCertificates_.get(index); + } + /** + * + * + *
+     * Required. Expected to be in leaf-to-root order according to RFC 5246.
+     * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the pemCertificates at the given index. + */ + public com.google.protobuf.ByteString getPemCertificatesBytes(int index) { + return pemCertificates_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < pemCertificates_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pemCertificates_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < pemCertificates_.size(); i++) { + dataSize += computeStringSizeNoTag(pemCertificates_.getRaw(i)); + } + size += dataSize; + size += 1 * getPemCertificatesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain other = + (com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + obj; + + if (!getPemCertificatesList().equals(other.getPemCertificatesList())) return false; + if (!unknownFields.equals(other.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 (getPemCertificatesCount() > 0) { + hash = (37 * hash) + PEM_CERTIFICATES_FIELD_NUMBER; + hash = (53 * hash) + getPemCertificatesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * This message describes a subordinate CA's issuer certificate chain. This
+     * wrapper exists for compatibility reasons.
+     * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChainOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_SubordinateConfigChain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_SubordinateConfigChain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .class, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + pemCertificates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_SubordinateConfigChain_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + build() { + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + buildPartial() { + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + result = + new com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + pemCertificates_ = pemCertificates_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pemCertificates_ = pemCertificates_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + other) { + if (other + == com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .getDefaultInstance()) return this; + if (!other.pemCertificates_.isEmpty()) { + if (pemCertificates_.isEmpty()) { + pemCertificates_ = other.pemCertificates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePemCertificatesIsMutable(); + pemCertificates_.addAll(other.pemCertificates_); + } + 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.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList pemCertificates_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensurePemCertificatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pemCertificates_ = new com.google.protobuf.LazyStringArrayList(pemCertificates_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Required. Expected to be in leaf-to-root order according to RFC 5246.
+       * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the pemCertificates. + */ + public com.google.protobuf.ProtocolStringList getPemCertificatesList() { + return pemCertificates_.getUnmodifiableView(); + } + /** + * + * + *
+       * Required. Expected to be in leaf-to-root order according to RFC 5246.
+       * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of pemCertificates. + */ + public int getPemCertificatesCount() { + return pemCertificates_.size(); + } + /** + * + * + *
+       * Required. Expected to be in leaf-to-root order according to RFC 5246.
+       * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The pemCertificates at the given index. + */ + public java.lang.String getPemCertificates(int index) { + return pemCertificates_.get(index); + } + /** + * + * + *
+       * Required. Expected to be in leaf-to-root order according to RFC 5246.
+       * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pemCertificates at the given index. + */ + public com.google.protobuf.ByteString getPemCertificatesBytes(int index) { + return pemCertificates_.getByteString(index); + } + /** + * + * + *
+       * Required. Expected to be in leaf-to-root order according to RFC 5246.
+       * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The pemCertificates to set. + * @return This builder for chaining. + */ + public Builder setPemCertificates(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePemCertificatesIsMutable(); + pemCertificates_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Expected to be in leaf-to-root order according to RFC 5246.
+       * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The pemCertificates to add. + * @return This builder for chaining. + */ + public Builder addPemCertificates(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePemCertificatesIsMutable(); + pemCertificates_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Expected to be in leaf-to-root order according to RFC 5246.
+       * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The pemCertificates to add. + * @return This builder for chaining. + */ + public Builder addAllPemCertificates(java.lang.Iterable values) { + ensurePemCertificatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pemCertificates_); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Expected to be in leaf-to-root order according to RFC 5246.
+       * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPemCertificates() { + pemCertificates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Expected to be in leaf-to-root order according to RFC 5246.
+       * 
+ * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes of the pemCertificates to add. + * @return This builder for chaining. + */ + public Builder addPemCertificatesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePemCertificatesIsMutable(); + pemCertificates_.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.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + private static final com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain(); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubordinateConfigChain parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SubordinateConfigChain(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int subordinateConfigCase_ = 0; + private java.lang.Object subordinateConfig_; + + public enum SubordinateConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CERTIFICATE_AUTHORITY(1), + PEM_ISSUER_CHAIN(2), + SUBORDINATECONFIG_NOT_SET(0); + private final int value; + + private SubordinateConfigCase(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 SubordinateConfigCase valueOf(int value) { + return forNumber(value); + } + + public static SubordinateConfigCase forNumber(int value) { + switch (value) { + case 1: + return CERTIFICATE_AUTHORITY; + case 2: + return PEM_ISSUER_CHAIN; + case 0: + return SUBORDINATECONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SubordinateConfigCase getSubordinateConfigCase() { + return SubordinateConfigCase.forNumber(subordinateConfigCase_); + } + + public static final int CERTIFICATE_AUTHORITY_FIELD_NUMBER = 1; + /** + * + * + *
+   * Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that
+   * was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field
+   * is used for information and usability purposes only. The resource name
+   * is in the format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * string certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateAuthority. + */ + public java.lang.String getCertificateAuthority() { + java.lang.Object ref = ""; + if (subordinateConfigCase_ == 1) { + ref = subordinateConfig_; + } + if (ref instanceof java.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 (subordinateConfigCase_ == 1) { + subordinateConfig_ = s; + } + return s; + } + } + /** + * + * + *
+   * Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that
+   * was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field
+   * is used for information and usability purposes only. The resource name
+   * is in the format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * string certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateAuthority. + */ + public com.google.protobuf.ByteString getCertificateAuthorityBytes() { + java.lang.Object ref = ""; + if (subordinateConfigCase_ == 1) { + ref = subordinateConfig_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (subordinateConfigCase_ == 1) { + subordinateConfig_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEM_ISSUER_CHAIN_FIELD_NUMBER = 2; + /** + * + * + *
+   * Required. Contains the PEM certificate chain for the issuers of this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pemIssuerChain field is set. + */ + @java.lang.Override + public boolean hasPemIssuerChain() { + return subordinateConfigCase_ == 2; + } + /** + * + * + *
+   * Required. Contains the PEM certificate chain for the issuers of this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pemIssuerChain. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + getPemIssuerChain() { + if (subordinateConfigCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + subordinateConfig_; + } + return com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .getDefaultInstance(); + } + /** + * + * + *
+   * Required. Contains the PEM certificate chain for the issuers of this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChainOrBuilder + getPemIssuerChainOrBuilder() { + if (subordinateConfigCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + subordinateConfig_; + } + return com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .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 (subordinateConfigCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subordinateConfig_); + } + if (subordinateConfigCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + subordinateConfig_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (subordinateConfigCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subordinateConfig_); + } + if (subordinateConfigCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + subordinateConfig_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.SubordinateConfig)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.SubordinateConfig other = + (com.google.cloud.security.privateca.v1beta1.SubordinateConfig) obj; + + if (!getSubordinateConfigCase().equals(other.getSubordinateConfigCase())) return false; + switch (subordinateConfigCase_) { + case 1: + if (!getCertificateAuthority().equals(other.getCertificateAuthority())) return false; + break; + case 2: + if (!getPemIssuerChain().equals(other.getPemIssuerChain())) 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 (subordinateConfigCase_) { + case 1: + hash = (37 * hash) + CERTIFICATE_AUTHORITY_FIELD_NUMBER; + hash = (53 * hash) + getCertificateAuthority().hashCode(); + break; + case 2: + hash = (37 * hash) + PEM_ISSUER_CHAIN_FIELD_NUMBER; + hash = (53 * hash) + getPemIssuerChain().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes a subordinate CA's issuers. This is either a resource path to a
+   * known issuing [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], or a PEM issuer certificate chain.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.SubordinateConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.SubordinateConfig) + com.google.cloud.security.privateca.v1beta1.SubordinateConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.class, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.SubordinateConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + subordinateConfigCase_ = 0; + subordinateConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_SubordinateConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.SubordinateConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig build() { + com.google.cloud.security.privateca.v1beta1.SubordinateConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig buildPartial() { + com.google.cloud.security.privateca.v1beta1.SubordinateConfig result = + new com.google.cloud.security.privateca.v1beta1.SubordinateConfig(this); + if (subordinateConfigCase_ == 1) { + result.subordinateConfig_ = subordinateConfig_; + } + if (subordinateConfigCase_ == 2) { + if (pemIssuerChainBuilder_ == null) { + result.subordinateConfig_ = subordinateConfig_; + } else { + result.subordinateConfig_ = pemIssuerChainBuilder_.build(); + } + } + result.subordinateConfigCase_ = subordinateConfigCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.SubordinateConfig) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.SubordinateConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.security.privateca.v1beta1.SubordinateConfig other) { + if (other + == com.google.cloud.security.privateca.v1beta1.SubordinateConfig.getDefaultInstance()) + return this; + switch (other.getSubordinateConfigCase()) { + case CERTIFICATE_AUTHORITY: + { + subordinateConfigCase_ = 1; + subordinateConfig_ = other.subordinateConfig_; + onChanged(); + break; + } + case PEM_ISSUER_CHAIN: + { + mergePemIssuerChain(other.getPemIssuerChain()); + break; + } + case SUBORDINATECONFIG_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.security.privateca.v1beta1.SubordinateConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.SubordinateConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int subordinateConfigCase_ = 0; + private java.lang.Object subordinateConfig_; + + public SubordinateConfigCase getSubordinateConfigCase() { + return SubordinateConfigCase.forNumber(subordinateConfigCase_); + } + + public Builder clearSubordinateConfig() { + subordinateConfigCase_ = 0; + subordinateConfig_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that
+     * was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field
+     * is used for information and usability purposes only. The resource name
+     * is in the format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * string certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateAuthority. + */ + @java.lang.Override + public java.lang.String getCertificateAuthority() { + java.lang.Object ref = ""; + if (subordinateConfigCase_ == 1) { + ref = subordinateConfig_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (subordinateConfigCase_ == 1) { + subordinateConfig_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that
+     * was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field
+     * is used for information and usability purposes only. The resource name
+     * is in the format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * string certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateAuthority. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCertificateAuthorityBytes() { + java.lang.Object ref = ""; + if (subordinateConfigCase_ == 1) { + ref = subordinateConfig_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (subordinateConfigCase_ == 1) { + subordinateConfig_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that
+     * was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field
+     * is used for information and usability purposes only. The resource name
+     * is in the format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * string certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The certificateAuthority to set. + * @return This builder for chaining. + */ + public Builder setCertificateAuthority(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subordinateConfigCase_ = 1; + subordinateConfig_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that
+     * was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field
+     * is used for information and usability purposes only. The resource name
+     * is in the format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * string certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCertificateAuthority() { + if (subordinateConfigCase_ == 1) { + subordinateConfigCase_ = 0; + subordinateConfig_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that
+     * was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field
+     * is used for information and usability purposes only. The resource name
+     * is in the format `projects/*/locations/*/certificateAuthorities/*`.
+     * 
+ * + * string certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for certificateAuthority to set. + * @return This builder for chaining. + */ + public Builder setCertificateAuthorityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subordinateConfigCase_ = 1; + subordinateConfig_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .Builder, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChainOrBuilder> + pemIssuerChainBuilder_; + /** + * + * + *
+     * Required. Contains the PEM certificate chain for the issuers of this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pemIssuerChain field is set. + */ + @java.lang.Override + public boolean hasPemIssuerChain() { + return subordinateConfigCase_ == 2; + } + /** + * + * + *
+     * Required. Contains the PEM certificate chain for the issuers of this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pemIssuerChain. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + getPemIssuerChain() { + if (pemIssuerChainBuilder_ == null) { + if (subordinateConfigCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain) + subordinateConfig_; + } + return com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .getDefaultInstance(); + } else { + if (subordinateConfigCase_ == 2) { + return pemIssuerChainBuilder_.getMessage(); + } + return com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Required. Contains the PEM certificate chain for the issuers of this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPemIssuerChain( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + value) { + if (pemIssuerChainBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subordinateConfig_ = value; + onChanged(); + } else { + pemIssuerChainBuilder_.setMessage(value); + } + subordinateConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Required. Contains the PEM certificate chain for the issuers of this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPemIssuerChain( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.Builder + builderForValue) { + if (pemIssuerChainBuilder_ == null) { + subordinateConfig_ = builderForValue.build(); + onChanged(); + } else { + pemIssuerChainBuilder_.setMessage(builderForValue.build()); + } + subordinateConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Required. Contains the PEM certificate chain for the issuers of this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePemIssuerChain( + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + value) { + if (pemIssuerChainBuilder_ == null) { + if (subordinateConfigCase_ == 2 + && subordinateConfig_ + != com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain.getDefaultInstance()) { + subordinateConfig_ = + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .newBuilder( + (com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain) + subordinateConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + subordinateConfig_ = value; + } + onChanged(); + } else { + if (subordinateConfigCase_ == 2) { + pemIssuerChainBuilder_.mergeFrom(value); + } + pemIssuerChainBuilder_.setMessage(value); + } + subordinateConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Required. Contains the PEM certificate chain for the issuers of this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPemIssuerChain() { + if (pemIssuerChainBuilder_ == null) { + if (subordinateConfigCase_ == 2) { + subordinateConfigCase_ = 0; + subordinateConfig_ = null; + onChanged(); + } + } else { + if (subordinateConfigCase_ == 2) { + subordinateConfigCase_ = 0; + subordinateConfig_ = null; + } + pemIssuerChainBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Contains the PEM certificate chain for the issuers of this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .Builder + getPemIssuerChainBuilder() { + return getPemIssuerChainFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Contains the PEM certificate chain for the issuers of this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChainOrBuilder + getPemIssuerChainOrBuilder() { + if ((subordinateConfigCase_ == 2) && (pemIssuerChainBuilder_ != null)) { + return pemIssuerChainBuilder_.getMessageOrBuilder(); + } else { + if (subordinateConfigCase_ == 2) { + return (com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain) + subordinateConfig_; + } + return com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Required. Contains the PEM certificate chain for the issuers of this
+     * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .Builder, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChainOrBuilder> + getPemIssuerChainFieldBuilder() { + if (pemIssuerChainBuilder_ == null) { + if (!(subordinateConfigCase_ == 2)) { + subordinateConfig_ = + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .getDefaultInstance(); + } + pemIssuerChainBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + .Builder, + com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChainOrBuilder>( + (com.google.cloud.security.privateca.v1beta1.SubordinateConfig + .SubordinateConfigChain) + subordinateConfig_, + getParentForChildren(), + isClean()); + subordinateConfig_ = null; + } + subordinateConfigCase_ = 2; + onChanged(); + ; + return pemIssuerChainBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.security.privateca.v1beta1.SubordinateConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.SubordinateConfig) + private static final com.google.cloud.security.privateca.v1beta1.SubordinateConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.SubordinateConfig(); + } + + public static com.google.cloud.security.privateca.v1beta1.SubordinateConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubordinateConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SubordinateConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubordinateConfigOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubordinateConfigOrBuilder.java new file mode 100644 index 00000000..207e81ff --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/SubordinateConfigOrBuilder.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/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface SubordinateConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.SubordinateConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that
+   * was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field
+   * is used for information and usability purposes only. The resource name
+   * is in the format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * string certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateAuthority. + */ + java.lang.String getCertificateAuthority(); + /** + * + * + *
+   * Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that
+   * was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field
+   * is used for information and usability purposes only. The resource name
+   * is in the format `projects/*/locations/*/certificateAuthorities/*`.
+   * 
+ * + * string certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateAuthority. + */ + com.google.protobuf.ByteString getCertificateAuthorityBytes(); + + /** + * + * + *
+   * Required. Contains the PEM certificate chain for the issuers of this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pemIssuerChain field is set. + */ + boolean hasPemIssuerChain(); + /** + * + * + *
+   * Required. Contains the PEM certificate chain for the issuers of this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pemIssuerChain. + */ + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + getPemIssuerChain(); + /** + * + * + *
+   * Required. Contains the PEM certificate chain for the issuers of this
+   * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain pem_issuer_chain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChainOrBuilder + getPemIssuerChainOrBuilder(); + + public com.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigCase + getSubordinateConfigCase(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateAuthorityRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateAuthorityRequest.java new file mode 100644 index 00000000..e994c295 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateAuthorityRequest.java @@ -0,0 +1,1332 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.UpdateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest} + */ +public final class UpdateCertificateAuthorityRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest) + UpdateCertificateAuthorityRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCertificateAuthorityRequest.newBuilder() to construct. + private UpdateCertificateAuthorityRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCertificateAuthorityRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCertificateAuthorityRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateCertificateAuthorityRequest( + 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.security.privateca.v1beta1.CertificateAuthority.Builder subBuilder = + null; + if (certificateAuthority_ != null) { + subBuilder = certificateAuthority_.toBuilder(); + } + certificateAuthority_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificateAuthority_); + certificateAuthority_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.Builder + .class); + } + + public static final int CERTIFICATE_AUTHORITY_FIELD_NUMBER = 1; + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority certificateAuthority_; + /** + * + * + *
+   * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateAuthority field is set. + */ + @java.lang.Override + public boolean hasCertificateAuthority() { + return certificateAuthority_ != null; + } + /** + * + * + *
+   * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateAuthority. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + getCertificateAuthority() { + return certificateAuthority_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.getDefaultInstance() + : certificateAuthority_; + } + /** + * + * + *
+   * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder + getCertificateAuthorityOrBuilder() { + return getCertificateAuthority(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 (certificateAuthority_ != null) { + output.writeMessage(1, getCertificateAuthority()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + 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 (certificateAuthority_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCertificateAuthority()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.security.privateca.v1beta1.UpdateCertificateAuthorityRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest other = + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest) obj; + + if (hasCertificateAuthority() != other.hasCertificateAuthority()) return false; + if (hasCertificateAuthority()) { + if (!getCertificateAuthority().equals(other.getCertificateAuthority())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCertificateAuthority()) { + hash = (37 * hash) + CERTIFICATE_AUTHORITY_FIELD_NUMBER; + hash = (53 * hash) + getCertificateAuthority().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.UpdateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest) + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.class, + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (certificateAuthorityBuilder_ == null) { + certificateAuthority_ = null; + } else { + certificateAuthority_ = null; + certificateAuthorityBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest build() { + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest result = + new com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest(this); + if (certificateAuthorityBuilder_ == null) { + result.certificateAuthority_ = certificateAuthority_; + } else { + result.certificateAuthority_ = certificateAuthorityBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + .getDefaultInstance()) return this; + if (other.hasCertificateAuthority()) { + mergeCertificateAuthority(other.getCertificateAuthority()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateAuthority certificateAuthority_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder> + certificateAuthorityBuilder_; + /** + * + * + *
+     * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateAuthority field is set. + */ + public boolean hasCertificateAuthority() { + return certificateAuthorityBuilder_ != null || certificateAuthority_ != null; + } + /** + * + * + *
+     * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateAuthority. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority + getCertificateAuthority() { + if (certificateAuthorityBuilder_ == null) { + return certificateAuthority_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.getDefaultInstance() + : certificateAuthority_; + } else { + return certificateAuthorityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority value) { + if (certificateAuthorityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateAuthority_ = value; + onChanged(); + } else { + certificateAuthorityBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder builderForValue) { + if (certificateAuthorityBuilder_ == null) { + certificateAuthority_ = builderForValue.build(); + onChanged(); + } else { + certificateAuthorityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificateAuthority( + com.google.cloud.security.privateca.v1beta1.CertificateAuthority value) { + if (certificateAuthorityBuilder_ == null) { + if (certificateAuthority_ != null) { + certificateAuthority_ = + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.newBuilder( + certificateAuthority_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateAuthority_ = value; + } + onChanged(); + } else { + certificateAuthorityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificateAuthority() { + if (certificateAuthorityBuilder_ == null) { + certificateAuthority_ = null; + onChanged(); + } else { + certificateAuthority_ = null; + certificateAuthorityBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder + getCertificateAuthorityBuilder() { + + onChanged(); + return getCertificateAuthorityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder + getCertificateAuthorityOrBuilder() { + if (certificateAuthorityBuilder_ != null) { + return certificateAuthorityBuilder_.getMessageOrBuilder(); + } else { + return certificateAuthority_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateAuthority.getDefaultInstance() + : certificateAuthority_; + } + } + /** + * + * + *
+     * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder> + getCertificateAuthorityFieldBuilder() { + if (certificateAuthorityBuilder_ == null) { + certificateAuthorityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateAuthority, + com.google.cloud.security.privateca.v1beta1.CertificateAuthority.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder>( + getCertificateAuthority(), getParentForChildren(), isClean()); + certificateAuthority_ = null; + } + return certificateAuthorityBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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.security.privateca.v1beta1.UpdateCertificateAuthorityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest) + private static final com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCertificateAuthorityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateCertificateAuthorityRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateAuthorityRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateAuthorityRequestOrBuilder.java new file mode 100644 index 00000000..302e992d --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateAuthorityRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface UpdateCertificateAuthorityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateAuthority field is set. + */ + boolean hasCertificateAuthority(); + /** + * + * + *
+   * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateAuthority. + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthority getCertificateAuthority(); + /** + * + * + *
+   * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateAuthority certificate_authority = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateAuthorityOrBuilder + getCertificateAuthorityOrBuilder(); + + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRequest.java new file mode 100644 index 00000000..25786102 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRequest.java @@ -0,0 +1,1307 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for [CertificateAuthorityService.UpdateCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.UpdateCertificateRequest} + */ +public final class UpdateCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.UpdateCertificateRequest) + UpdateCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCertificateRequest.newBuilder() to construct. + private UpdateCertificateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCertificateRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateCertificateRequest( + 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.security.privateca.v1beta1.Certificate.Builder subBuilder = null; + if (certificate_ != null) { + subBuilder = certificate_.toBuilder(); + } + certificate_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.Certificate.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificate_); + certificate_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.class, + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.Builder.class); + } + + public static final int CERTIFICATE_FIELD_NUMBER = 1; + private com.google.cloud.security.privateca.v1beta1.Certificate certificate_; + /** + * + * + *
+   * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + @java.lang.Override + public boolean hasCertificate() { + return certificate_ != null; + } + /** + * + * + *
+   * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.Certificate getCertificate() { + return certificate_ == null + ? com.google.cloud.security.privateca.v1beta1.Certificate.getDefaultInstance() + : certificate_; + } + /** + * + * + *
+   * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder + getCertificateOrBuilder() { + return getCertificate(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 (certificate_ != null) { + output.writeMessage(1, getCertificate()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + 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 (certificate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCertificate()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.security.privateca.v1beta1.UpdateCertificateRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest other = + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest) obj; + + if (hasCertificate() != other.hasCertificate()) return false; + if (hasCertificate()) { + if (!getCertificate().equals(other.getCertificate())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCertificate()) { + hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getCertificate().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CertificateAuthorityService.UpdateCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.UpdateCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.UpdateCertificateRequest) + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.class, + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (certificateBuilder_ == null) { + certificate_ = null; + } else { + certificate_ = null; + certificateBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest build() { + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest buildPartial() { + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest result = + new com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest(this); + if (certificateBuilder_ == null) { + result.certificate_ = certificate_; + } else { + result.certificate_ = certificateBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + .getDefaultInstance()) return this; + if (other.hasCertificate()) { + mergeCertificate(other.getCertificate()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.security.privateca.v1beta1.Certificate certificate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder> + certificateBuilder_; + /** + * + * + *
+     * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + public boolean hasCertificate() { + return certificateBuilder_ != null || certificate_ != null; + } + /** + * + * + *
+     * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + public com.google.cloud.security.privateca.v1beta1.Certificate getCertificate() { + if (certificateBuilder_ == null) { + return certificate_ == null + ? com.google.cloud.security.privateca.v1beta1.Certificate.getDefaultInstance() + : certificate_; + } else { + return certificateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificate(com.google.cloud.security.privateca.v1beta1.Certificate value) { + if (certificateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificate_ = value; + onChanged(); + } else { + certificateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificate( + com.google.cloud.security.privateca.v1beta1.Certificate.Builder builderForValue) { + if (certificateBuilder_ == null) { + certificate_ = builderForValue.build(); + onChanged(); + } else { + certificateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificate(com.google.cloud.security.privateca.v1beta1.Certificate value) { + if (certificateBuilder_ == null) { + if (certificate_ != null) { + certificate_ = + com.google.cloud.security.privateca.v1beta1.Certificate.newBuilder(certificate_) + .mergeFrom(value) + .buildPartial(); + } else { + certificate_ = value; + } + onChanged(); + } else { + certificateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificate() { + if (certificateBuilder_ == null) { + certificate_ = null; + onChanged(); + } else { + certificate_ = null; + certificateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.Certificate.Builder getCertificateBuilder() { + + onChanged(); + return getCertificateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder + getCertificateOrBuilder() { + if (certificateBuilder_ != null) { + return certificateBuilder_.getMessageOrBuilder(); + } else { + return certificate_ == null + ? com.google.cloud.security.privateca.v1beta1.Certificate.getDefaultInstance() + : certificate_; + } + } + /** + * + * + *
+     * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder> + getCertificateFieldBuilder() { + if (certificateBuilder_ == null) { + certificateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.Certificate, + com.google.cloud.security.privateca.v1beta1.Certificate.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder>( + getCertificate(), getParentForChildren(), isClean()); + certificate_ = null; + } + return certificateBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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.security.privateca.v1beta1.UpdateCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.UpdateCertificateRequest) + private static final com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateCertificateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRequestOrBuilder.java new file mode 100644 index 00000000..eed4a3ff --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRequestOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface UpdateCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.UpdateCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + boolean hasCertificate(); + /** + * + * + *
+   * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + com.google.cloud.security.privateca.v1beta1.Certificate getCertificate(); + /** + * + * + *
+   * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateOrBuilder getCertificateOrBuilder(); + + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRevocationListRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRevocationListRequest.java new file mode 100644 index 00000000..3ef718b7 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRevocationListRequest.java @@ -0,0 +1,1351 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.UpdateCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList].
+ * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} + */ +public final class UpdateCertificateRevocationListRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) + UpdateCertificateRevocationListRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCertificateRevocationListRequest.newBuilder() to construct. + private UpdateCertificateRevocationListRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCertificateRevocationListRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCertificateRevocationListRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateCertificateRevocationListRequest( + 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.security.privateca.v1beta1.CertificateRevocationList.Builder + subBuilder = null; + if (certificateRevocationList_ != null) { + subBuilder = certificateRevocationList_.toBuilder(); + } + certificateRevocationList_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificateRevocationList_); + certificateRevocationList_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRevocationListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRevocationListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + .class, + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + .Builder.class); + } + + public static final int CERTIFICATE_REVOCATION_LIST_FIELD_NUMBER = 1; + private com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + certificateRevocationList_; + /** + * + * + *
+   * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateRevocationList field is set. + */ + @java.lang.Override + public boolean hasCertificateRevocationList() { + return certificateRevocationList_ != null; + } + /** + * + * + *
+   * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateRevocationList. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getCertificateRevocationList() { + return certificateRevocationList_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.getDefaultInstance() + : certificateRevocationList_; + } + /** + * + * + *
+   * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder + getCertificateRevocationListOrBuilder() { + return getCertificateRevocationList(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 (certificateRevocationList_ != null) { + output.writeMessage(1, getCertificateRevocationList()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + 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 (certificateRevocationList_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, getCertificateRevocationList()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.security.privateca.v1beta1.UpdateCertificateRevocationListRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest other = + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) obj; + + if (hasCertificateRevocationList() != other.hasCertificateRevocationList()) return false; + if (hasCertificateRevocationList()) { + if (!getCertificateRevocationList().equals(other.getCertificateRevocationList())) + return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCertificateRevocationList()) { + hash = (37 * hash) + CERTIFICATE_REVOCATION_LIST_FIELD_NUMBER; + hash = (53 * hash) + getCertificateRevocationList().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.UpdateCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList].
+   * 
+ * + * Protobuf type {@code + * google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRevocationListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRevocationListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + .class, + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (certificateRevocationListBuilder_ == null) { + certificateRevocationList_ = null; + } else { + certificateRevocationList_ = null; + certificateRevocationListBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateCertificateRevocationListRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + build() { + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + buildPartial() { + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest result = + new com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest( + this); + if (certificateRevocationListBuilder_ == null) { + result.certificateRevocationList_ = certificateRevocationList_; + } else { + result.certificateRevocationList_ = certificateRevocationListBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + .getDefaultInstance()) return this; + if (other.hasCertificateRevocationList()) { + mergeCertificateRevocationList(other.getCertificateRevocationList()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + certificateRevocationList_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder> + certificateRevocationListBuilder_; + /** + * + * + *
+     * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateRevocationList field is set. + */ + public boolean hasCertificateRevocationList() { + return certificateRevocationListBuilder_ != null || certificateRevocationList_ != null; + } + /** + * + * + *
+     * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateRevocationList. + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getCertificateRevocationList() { + if (certificateRevocationListBuilder_ == null) { + return certificateRevocationList_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .getDefaultInstance() + : certificateRevocationList_; + } else { + return certificateRevocationListBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList value) { + if (certificateRevocationListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateRevocationList_ = value; + onChanged(); + } else { + certificateRevocationListBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder + builderForValue) { + if (certificateRevocationListBuilder_ == null) { + certificateRevocationList_ = builderForValue.build(); + onChanged(); + } else { + certificateRevocationListBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificateRevocationList( + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList value) { + if (certificateRevocationListBuilder_ == null) { + if (certificateRevocationList_ != null) { + certificateRevocationList_ = + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.newBuilder( + certificateRevocationList_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateRevocationList_ = value; + } + onChanged(); + } else { + certificateRevocationListBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificateRevocationList() { + if (certificateRevocationListBuilder_ == null) { + certificateRevocationList_ = null; + onChanged(); + } else { + certificateRevocationList_ = null; + certificateRevocationListBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder + getCertificateRevocationListBuilder() { + + onChanged(); + return getCertificateRevocationListFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder + getCertificateRevocationListOrBuilder() { + if (certificateRevocationListBuilder_ != null) { + return certificateRevocationListBuilder_.getMessageOrBuilder(); + } else { + return certificateRevocationList_ == null + ? com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + .getDefaultInstance() + : certificateRevocationList_; + } + } + /** + * + * + *
+     * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder> + getCertificateRevocationListFieldBuilder() { + if (certificateRevocationListBuilder_ == null) { + certificateRevocationListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList.Builder, + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder>( + getCertificateRevocationList(), getParentForChildren(), isClean()); + certificateRevocationList_ = null; + } + return certificateRevocationListBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) + private static final com.google.cloud.security.privateca.v1beta1 + .UpdateCertificateRevocationListRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCertificateRevocationListRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateCertificateRevocationListRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRevocationListRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRevocationListRequestOrBuilder.java new file mode 100644 index 00000000..d539a069 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateCertificateRevocationListRequestOrBuilder.java @@ -0,0 +1,151 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface UpdateCertificateRevocationListRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateRevocationList field is set. + */ + boolean hasCertificateRevocationList(); + /** + * + * + *
+   * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateRevocationList. + */ + com.google.cloud.security.privateca.v1beta1.CertificateRevocationList + getCertificateRevocationList(); + /** + * + * + *
+   * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.CertificateRevocationList certificate_revocation_list = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.CertificateRevocationListOrBuilder + getCertificateRevocationListOrBuilder(); + + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateReusableConfigRequest.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateReusableConfigRequest.java new file mode 100644 index 00000000..3b488f96 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateReusableConfigRequest.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/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [CertificateAuthorityService.UpdateReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateReusableConfig].
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} + */ +public final class UpdateReusableConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest) + UpdateReusableConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateReusableConfigRequest.newBuilder() to construct. + private UpdateReusableConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateReusableConfigRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateReusableConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateReusableConfigRequest( + 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.security.privateca.v1beta1.ReusableConfig.Builder subBuilder = null; + if (reusableConfig_ != null) { + subBuilder = reusableConfig_.toBuilder(); + } + reusableConfig_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ReusableConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reusableConfig_); + reusableConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 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.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateReusableConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateReusableConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.class, + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.Builder.class); + } + + public static final int REUSABLE_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.security.privateca.v1beta1.ReusableConfig reusableConfig_; + /** + * + * + *
+   * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfig field is set. + */ + @java.lang.Override + public boolean hasReusableConfig() { + return reusableConfig_ != null; + } + /** + * + * + *
+   * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfig. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfig getReusableConfig() { + return reusableConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfig.getDefaultInstance() + : reusableConfig_; + } + /** + * + * + *
+   * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder + getReusableConfigOrBuilder() { + return getReusableConfig(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 (reusableConfig_ != null) { + output.writeMessage(1, getReusableConfig()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + 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 (reusableConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getReusableConfig()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.security.privateca.v1beta1.UpdateReusableConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest other = + (com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest) obj; + + if (hasReusableConfig() != other.hasReusableConfig()) return false; + if (hasReusableConfig()) { + if (!getReusableConfig().equals(other.getReusableConfig())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasReusableConfig()) { + hash = (37 * hash) + REUSABLE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getReusableConfig().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CertificateAuthorityService.UpdateReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateReusableConfig].
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest) + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateReusableConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateReusableConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.class, + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (reusableConfigBuilder_ == null) { + reusableConfig_ = null; + } else { + reusableConfig_ = null; + reusableConfigBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaProto + .internal_static_google_cloud_security_privateca_v1beta1_UpdateReusableConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest build() { + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest buildPartial() { + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest result = + new com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest(this); + if (reusableConfigBuilder_ == null) { + result.reusableConfig_ = reusableConfig_; + } else { + result.reusableConfig_ = reusableConfigBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest) { + return mergeFrom( + (com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest other) { + if (other + == com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + .getDefaultInstance()) return this; + if (other.hasReusableConfig()) { + mergeReusableConfig(other.getReusableConfig()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.security.privateca.v1beta1.ReusableConfig reusableConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfig, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder> + reusableConfigBuilder_; + /** + * + * + *
+     * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfig field is set. + */ + public boolean hasReusableConfig() { + return reusableConfigBuilder_ != null || reusableConfig_ != null; + } + /** + * + * + *
+     * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfig. + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfig getReusableConfig() { + if (reusableConfigBuilder_ == null) { + return reusableConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfig.getDefaultInstance() + : reusableConfig_; + } else { + return reusableConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReusableConfig( + com.google.cloud.security.privateca.v1beta1.ReusableConfig value) { + if (reusableConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reusableConfig_ = value; + onChanged(); + } else { + reusableConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReusableConfig( + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder builderForValue) { + if (reusableConfigBuilder_ == null) { + reusableConfig_ = builderForValue.build(); + onChanged(); + } else { + reusableConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeReusableConfig( + com.google.cloud.security.privateca.v1beta1.ReusableConfig value) { + if (reusableConfigBuilder_ == null) { + if (reusableConfig_ != null) { + reusableConfig_ = + com.google.cloud.security.privateca.v1beta1.ReusableConfig.newBuilder(reusableConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + reusableConfig_ = value; + } + onChanged(); + } else { + reusableConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearReusableConfig() { + if (reusableConfigBuilder_ == null) { + reusableConfig_ = null; + onChanged(); + } else { + reusableConfig_ = null; + reusableConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder + getReusableConfigBuilder() { + + onChanged(); + return getReusableConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder + getReusableConfigOrBuilder() { + if (reusableConfigBuilder_ != null) { + return reusableConfigBuilder_.getMessageOrBuilder(); + } else { + return reusableConfig_ == null + ? com.google.cloud.security.privateca.v1beta1.ReusableConfig.getDefaultInstance() + : reusableConfig_; + } + } + /** + * + * + *
+     * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfig, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder> + getReusableConfigFieldBuilder() { + if (reusableConfigBuilder_ == null) { + reusableConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ReusableConfig, + com.google.cloud.security.privateca.v1beta1.ReusableConfig.Builder, + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder>( + getReusableConfig(), getParentForChildren(), isClean()); + reusableConfig_ = null; + } + return reusableConfigBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. A list of fields to be updated in this request.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+     * minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID 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.security.privateca.v1beta1.UpdateReusableConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest) + private static final com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest(); + } + + public static com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateReusableConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateReusableConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateReusableConfigRequestOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateReusableConfigRequestOrBuilder.java new file mode 100644 index 00000000..04ff1845 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/UpdateReusableConfigRequestOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/service.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface UpdateReusableConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reusableConfig field is set. + */ + boolean hasReusableConfig(); + /** + * + * + *
+   * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reusableConfig. + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfig getReusableConfig(); + /** + * + * + *
+   * Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ReusableConfig reusable_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.ReusableConfigOrBuilder getReusableConfigOrBuilder(); + + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A list of fields to be updated in this request.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Optional. An 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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 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. The server will guarantee that for at least 60
+   * minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID 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-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/X509Extension.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/X509Extension.java new file mode 100644 index 00000000..98ceae1b --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/X509Extension.java @@ -0,0 +1,955 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +/** + * + * + *
+ * An [X509Extension][google.cloud.security.privateca.v1beta1.X509Extension] specifies an X.509 extension, which may be used in
+ * different parts of X.509 objects like certificates, CSRs, and CRLs.
+ * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.X509Extension} + */ +public final class X509Extension extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1beta1.X509Extension) + X509ExtensionOrBuilder { + private static final long serialVersionUID = 0L; + // Use X509Extension.newBuilder() to construct. + private X509Extension(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private X509Extension() { + value_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new X509Extension(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private X509Extension( + 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.security.privateca.v1beta1.ObjectId.Builder subBuilder = null; + if (objectId_ != null) { + subBuilder = objectId_.toBuilder(); + } + objectId_ = + input.readMessage( + com.google.cloud.security.privateca.v1beta1.ObjectId.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(objectId_); + objectId_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + critical_ = input.readBool(); + break; + } + case 26: + { + value_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (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.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_X509Extension_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_X509Extension_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.X509Extension.class, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder.class); + } + + public static final int OBJECT_ID_FIELD_NUMBER = 1; + private com.google.cloud.security.privateca.v1beta1.ObjectId objectId_; + /** + * + * + *
+   * Required. The OID for this X.509 extension.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the objectId field is set. + */ + @java.lang.Override + public boolean hasObjectId() { + return objectId_ != null; + } + /** + * + * + *
+   * Required. The OID for this X.509 extension.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The objectId. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ObjectId getObjectId() { + return objectId_ == null + ? com.google.cloud.security.privateca.v1beta1.ObjectId.getDefaultInstance() + : objectId_; + } + /** + * + * + *
+   * Required. The OID for this X.509 extension.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder getObjectIdOrBuilder() { + return getObjectId(); + } + + public static final int CRITICAL_FIELD_NUMBER = 2; + private boolean critical_; + /** + * + * + *
+   * Required. Indicates whether or not this extension is critical (i.e., if the client
+   * does not know how to handle this extension, the client should consider this
+   * to be an error).
+   * 
+ * + * bool critical = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The critical. + */ + @java.lang.Override + public boolean getCritical() { + return critical_; + } + + public static final int VALUE_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString value_; + /** + * + * + *
+   * Required. The value of this X.509 extension.
+   * 
+ * + * bytes value = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (objectId_ != null) { + output.writeMessage(1, getObjectId()); + } + if (critical_ != false) { + output.writeBool(2, critical_); + } + if (!value_.isEmpty()) { + output.writeBytes(3, value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (objectId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getObjectId()); + } + if (critical_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, critical_); + } + if (!value_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.security.privateca.v1beta1.X509Extension)) { + return super.equals(obj); + } + com.google.cloud.security.privateca.v1beta1.X509Extension other = + (com.google.cloud.security.privateca.v1beta1.X509Extension) obj; + + if (hasObjectId() != other.hasObjectId()) return false; + if (hasObjectId()) { + if (!getObjectId().equals(other.getObjectId())) return false; + } + if (getCritical() != other.getCritical()) return false; + if (!getValue().equals(other.getValue())) return false; + if (!unknownFields.equals(other.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 (hasObjectId()) { + hash = (37 * hash) + OBJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getObjectId().hashCode(); + } + hash = (37 * hash) + CRITICAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCritical()); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.security.privateca.v1beta1.X509Extension prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [X509Extension][google.cloud.security.privateca.v1beta1.X509Extension] specifies an X.509 extension, which may be used in
+   * different parts of X.509 objects like certificates, CSRs, and CRLs.
+   * 
+ * + * Protobuf type {@code google.cloud.security.privateca.v1beta1.X509Extension} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1beta1.X509Extension) + com.google.cloud.security.privateca.v1beta1.X509ExtensionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_X509Extension_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_X509Extension_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.security.privateca.v1beta1.X509Extension.class, + com.google.cloud.security.privateca.v1beta1.X509Extension.Builder.class); + } + + // Construct using com.google.cloud.security.privateca.v1beta1.X509Extension.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (objectIdBuilder_ == null) { + objectId_ = null; + } else { + objectId_ = null; + objectIdBuilder_ = null; + } + critical_ = false; + + value_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.security.privateca.v1beta1.PrivateCaResourcesProto + .internal_static_google_cloud_security_privateca_v1beta1_X509Extension_descriptor; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.X509Extension getDefaultInstanceForType() { + return com.google.cloud.security.privateca.v1beta1.X509Extension.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.X509Extension build() { + com.google.cloud.security.privateca.v1beta1.X509Extension result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.X509Extension buildPartial() { + com.google.cloud.security.privateca.v1beta1.X509Extension result = + new com.google.cloud.security.privateca.v1beta1.X509Extension(this); + if (objectIdBuilder_ == null) { + result.objectId_ = objectId_; + } else { + result.objectId_ = objectIdBuilder_.build(); + } + result.critical_ = critical_; + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.security.privateca.v1beta1.X509Extension) { + return mergeFrom((com.google.cloud.security.privateca.v1beta1.X509Extension) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.security.privateca.v1beta1.X509Extension other) { + if (other == com.google.cloud.security.privateca.v1beta1.X509Extension.getDefaultInstance()) + return this; + if (other.hasObjectId()) { + mergeObjectId(other.getObjectId()); + } + if (other.getCritical() != false) { + setCritical(other.getCritical()); + } + if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.security.privateca.v1beta1.X509Extension parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.security.privateca.v1beta1.X509Extension) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.security.privateca.v1beta1.ObjectId objectId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ObjectId, + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder, + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder> + objectIdBuilder_; + /** + * + * + *
+     * Required. The OID for this X.509 extension.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the objectId field is set. + */ + public boolean hasObjectId() { + return objectIdBuilder_ != null || objectId_ != null; + } + /** + * + * + *
+     * Required. The OID for this X.509 extension.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The objectId. + */ + public com.google.cloud.security.privateca.v1beta1.ObjectId getObjectId() { + if (objectIdBuilder_ == null) { + return objectId_ == null + ? com.google.cloud.security.privateca.v1beta1.ObjectId.getDefaultInstance() + : objectId_; + } else { + return objectIdBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The OID for this X.509 extension.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setObjectId(com.google.cloud.security.privateca.v1beta1.ObjectId value) { + if (objectIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + objectId_ = value; + onChanged(); + } else { + objectIdBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The OID for this X.509 extension.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setObjectId( + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder builderForValue) { + if (objectIdBuilder_ == null) { + objectId_ = builderForValue.build(); + onChanged(); + } else { + objectIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The OID for this X.509 extension.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeObjectId(com.google.cloud.security.privateca.v1beta1.ObjectId value) { + if (objectIdBuilder_ == null) { + if (objectId_ != null) { + objectId_ = + com.google.cloud.security.privateca.v1beta1.ObjectId.newBuilder(objectId_) + .mergeFrom(value) + .buildPartial(); + } else { + objectId_ = value; + } + onChanged(); + } else { + objectIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The OID for this X.509 extension.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearObjectId() { + if (objectIdBuilder_ == null) { + objectId_ = null; + onChanged(); + } else { + objectId_ = null; + objectIdBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The OID for this X.509 extension.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectId.Builder getObjectIdBuilder() { + + onChanged(); + return getObjectIdFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The OID for this X.509 extension.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder getObjectIdOrBuilder() { + if (objectIdBuilder_ != null) { + return objectIdBuilder_.getMessageOrBuilder(); + } else { + return objectId_ == null + ? com.google.cloud.security.privateca.v1beta1.ObjectId.getDefaultInstance() + : objectId_; + } + } + /** + * + * + *
+     * Required. The OID for this X.509 extension.
+     * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ObjectId, + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder, + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder> + getObjectIdFieldBuilder() { + if (objectIdBuilder_ == null) { + objectIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.security.privateca.v1beta1.ObjectId, + com.google.cloud.security.privateca.v1beta1.ObjectId.Builder, + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder>( + getObjectId(), getParentForChildren(), isClean()); + objectId_ = null; + } + return objectIdBuilder_; + } + + private boolean critical_; + /** + * + * + *
+     * Required. Indicates whether or not this extension is critical (i.e., if the client
+     * does not know how to handle this extension, the client should consider this
+     * to be an error).
+     * 
+ * + * bool critical = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The critical. + */ + @java.lang.Override + public boolean getCritical() { + return critical_; + } + /** + * + * + *
+     * Required. Indicates whether or not this extension is critical (i.e., if the client
+     * does not know how to handle this extension, the client should consider this
+     * to be an error).
+     * 
+ * + * bool critical = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The critical to set. + * @return This builder for chaining. + */ + public Builder setCritical(boolean value) { + + critical_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Indicates whether or not this extension is critical (i.e., if the client
+     * does not know how to handle this extension, the client should consider this
+     * to be an error).
+     * 
+ * + * bool critical = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCritical() { + + critical_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * Required. The value of this X.509 extension.
+     * 
+ * + * bytes value = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + * + * + *
+     * Required. The value of this X.509 extension.
+     * 
+ * + * bytes value = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The value of this X.509 extension.
+     * 
+ * + * bytes value = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + 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.security.privateca.v1beta1.X509Extension) + } + + // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1beta1.X509Extension) + private static final com.google.cloud.security.privateca.v1beta1.X509Extension DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1beta1.X509Extension(); + } + + public static com.google.cloud.security.privateca.v1beta1.X509Extension getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public X509Extension parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new X509Extension(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.security.privateca.v1beta1.X509Extension getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/X509ExtensionOrBuilder.java b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/X509ExtensionOrBuilder.java new file mode 100644 index 00000000..2453b823 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/java/com/google/cloud/security/privateca/v1beta1/X509ExtensionOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/security/privateca/v1beta1/resources.proto + +package com.google.cloud.security.privateca.v1beta1; + +public interface X509ExtensionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1beta1.X509Extension) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The OID for this X.509 extension.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the objectId field is set. + */ + boolean hasObjectId(); + /** + * + * + *
+   * Required. The OID for this X.509 extension.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The objectId. + */ + com.google.cloud.security.privateca.v1beta1.ObjectId getObjectId(); + /** + * + * + *
+   * Required. The OID for this X.509 extension.
+   * 
+ * + * + * .google.cloud.security.privateca.v1beta1.ObjectId object_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.security.privateca.v1beta1.ObjectIdOrBuilder getObjectIdOrBuilder(); + + /** + * + * + *
+   * Required. Indicates whether or not this extension is critical (i.e., if the client
+   * does not know how to handle this extension, the client should consider this
+   * to be an error).
+   * 
+ * + * bool critical = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The critical. + */ + boolean getCritical(); + + /** + * + * + *
+   * Required. The value of this X.509 extension.
+   * 
+ * + * bytes value = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + com.google.protobuf.ByteString getValue(); +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/proto/google/cloud/security/privateca/v1beta1/resources.proto b/proto-google-cloud-security-privateca-v1beta1/src/main/proto/google/cloud/security/privateca/v1beta1/resources.proto new file mode 100644 index 00000000..44b37d2d --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/proto/google/cloud/security/privateca/v1beta1/resources.proto @@ -0,0 +1,883 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.security.privateca.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Security.PrivateCA.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1;privateca"; +option java_multiple_files = true; +option java_outer_classname = "PrivateCaResourcesProto"; +option java_package = "com.google.cloud.security.privateca.v1beta1"; + +// A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] represents an individual Certificate Authority. +// A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. +message CertificateAuthority { + option (google.api.resource) = { + type: "privateca.googleapis.com/CertificateAuthority" + pattern: "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}" + }; + + // Options that affect all certificates issued by a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + message IssuingOptions { + // Required. When true, includes a URL to the issuing CA certificate in the + // "authority information access" X.509 extension. + bool include_ca_cert_url = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. When true, includes a URL to the CRL corresponding to certificates + // issued from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + // CRLs will expire 7 days from their creation. However, we will rebuild + // daily. CRLs are also rebuilt shortly after a certificate is revoked. + bool include_crl_access_url = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // The issuing policy for a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] will not be successfully issued from this + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] if they violate the policy. + message CertificateAuthorityPolicy { + message AllowedConfigList { + // Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a + // [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be + // allowed for that field. + repeated ReusableConfigWrapper allowed_config_values = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] specifies the allowed values for + // [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] when issuing + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + message AllowedSubjectAltNames { + // Optional. Contains valid, fully-qualified host names. Glob patterns are also + // supported. To allow an explicit wildcard certificate, escape with + // backlash (i.e. "\*"). + // E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not + // *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set. + // E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not + // 'foo.bar.com'. + repeated string allowed_dns_names = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To + // match across path seperators (i.e. '/') use the double star glob + // pattern (i.e. '**'). + repeated string allowed_uris = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also + // supported. + repeated string allowed_email_addresses = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6 + // addresses and subnet ranges. Subnet ranges are specified using the + // '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns + // are supported only for ip address entries (i.e. not for subnet ranges). + repeated string allowed_ips = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies if glob patterns used for [allowed_dns_names][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowed_dns_names] allows + // wildcard certificates. + bool allow_globbing_dns_wildcards = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies if to allow custom X509Extension values. + bool allow_custom_sans = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] specifies the allowed ways in which + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] may be requested from this + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + message IssuanceModes { + // Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by + // specifying a CSR. + bool allow_csr_based_issuance = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by + // specifying a [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig]. + bool allow_config_based_issuance = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Allowed configurations or a single configuration for all issued + // certificates. + oneof config_policy { + // Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list. + AllowedConfigList allowed_config_list = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // will use the provided configuration values, overwriting any requested + // configuration values. + ReusableConfigWrapper overwrite_config_values = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must + // match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty + // field, any value will be allowed for that field. + repeated Subject allowed_locations_and_organizations = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If any value is specified here, then all + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must + // match at least one listed value. If no value is specified, all values + // will be allowed for this fied. Glob patterns are also supported. + repeated string allowed_common_names = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must + // match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value + // is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] + // field. + AllowedSubjectAltNames allowed_sans = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that + // if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s + // requested maximum_lifetime, the effective lifetime will be explicitly + // truncated. + google.protobuf.Duration maximum_lifetime = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be + // used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + IssuanceModes allowed_issuance_modes = 8 [(google.api.field_behavior) = OPTIONAL]; + } + + // URLs where a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will publish content. + message AccessUrls { + // The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is + // published. This will only be set for CAs that have been activated. + string ca_certificate_access_url = 1; + + // The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This + // will only be set for CAs that have been activated. + string crl_access_url = 2; + } + + // A Cloud KMS key configuration that a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will use. + message KeyVersionSpec { + oneof KeyVersion { + // Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the + // format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + // This option enables full flexibility in the key's capabilities and + // properties. + string cloud_kms_key_version = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The algorithm to use for creating a managed Cloud KMS key for a for a + // simplified experience. All managed keys will be have their + // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`. + SignHashAlgorithm algorithm = 2 [(google.api.field_behavior) = REQUIRED]; + } + } + + // The type of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating its issuing chain. + enum Type { + // Not specified. + TYPE_UNSPECIFIED = 0; + + // Self-signed CA. + SELF_SIGNED = 1; + + // Subordinate CA. Could be issued by a Private CA [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // or an unmanaged CA. + SUBORDINATE = 2; + } + + // The tier of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating its supported + // functionality and/or billing SKU. + enum Tier { + // Not specified. + TIER_UNSPECIFIED = 0; + + // Enterprise tier. + ENTERPRISE = 1; + + // DevOps tier. + DEVOPS = 2; + } + + // The state of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating if it can be used. + enum State { + // Not specified. + STATE_UNSPECIFIED = 0; + + // Certificates can be issued from this CA. CRLs will be generated for this + // CA. + ENABLED = 1; + + // Certificates cannot be issued from this CA. CRLs will still be generated. + DISABLED = 2; + + // Certificates cannot be issued from this CA. CRLs will not be generated. + PENDING_ACTIVATION = 3; + + // Certificates cannot be issued from this CA. CRLs will not be generated. + PENDING_DELETION = 4; + } + + // The algorithm of a Cloud KMS CryptoKeyVersion of a + // [CryptoKey][google.cloud.kms.v1.CryptoKey] with the + // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value + // `ASYMMETRIC_SIGN`. These values correspond to the + // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKey.CryptoKeyVersion.CryptoKeyVersionAlgorithm]. + // values. + enum SignHashAlgorithm { + // Not specified. + SIGN_HASH_ALGORITHM_UNSPECIFIED = 0; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256 + RSA_PSS_2048_SHA_256 = 1; + + // maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256 + RSA_PSS_3072_SHA_256 = 2; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256 + RSA_PSS_4096_SHA_256 = 3; + + // maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256 + EC_P256_SHA256 = 4; + + // maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384 + EC_P384_SHA384 = 5; + } + + // Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + Type type = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + Tier tier = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The config used to create a self-signed X.509 certificate or CSR. + CertificateConfig config = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. The desired lifetime of the CA certificate. Used to create the + // "not_before_time" and "not_after_time" fields inside an X.509 + // certificate. + google.protobuf.Duration lifetime = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key + // is also used to sign the self-signed CA certificate. Otherwise, it + // is used to sign a CSR. + KeyVersionSpec key_spec = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + CertificateAuthorityPolicy certificate_policy = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate] + // from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + IssuingOptions issuing_options = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set + // with the subordinate configuration, which describes its issuers. This may + // be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate. + SubordinateConfig subordinate_config = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer + // is the final element (consistent with RFC 5246). For a self-signed CA, this + // will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. + repeated string pem_ca_certificates = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate + // and its issuers. Ordered as self-to-root. + repeated CertificateDescription ca_certificate_descriptions = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will + // publish content, such as the CA certificate and CRLs. This must be a bucket + // name, without any prefixes (such as `gs://`) or suffixes (such as + // `.googleapis.com`). For example, to use a bucket named `my-bucket`, you + // would simply specify `my-bucket`. If not specified, a managed bucket will + // be created. + string gcs_bucket = 13 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. URLs for accessing content published by this CA, such as the CA certificate + // and CRLs. + AccessUrls access_urls = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created. + google.protobuf.Timestamp create_time = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated. + google.protobuf.Timestamp update_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if + // scheduled for deletion. + google.protobuf.Timestamp delete_time = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 18 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] corresponds to a signed X.509 certificate +// Revocation List (CRL). A CRL contains the serial numbers of certificates that +// should no longer be trusted. +message CertificateRevocationList { + option (google.api.resource) = { + type: "privateca.googleapis.com/CertificateRevocationList" + pattern: "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}" + }; + + // Describes a revoked [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + message RevokedCertificate { + // The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format + // `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + string certificate = 1; + + // The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + string hex_serial_number = 2; + + // The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked. + RevocationReason revocation_reason = 3; + } + + // The state of a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], indicating if it is current. + enum State { + // Not specified. + STATE_UNSPECIFIED = 0; + + // The [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] is up to date. + ACTIVE = 1; + + // The [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] is no longer current. + SUPERSEDED = 2; + } + + // Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in + // the format + // `projects/*/locations/*/certificateAuthorities/*/ + // certificateRevocationLists/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The CRL sequence number that appears in pem_crl. + int64 sequence_number = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The revoked serial numbers that appear in pem_crl. + repeated RevokedCertificate revoked_certificates = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The PEM-encoded X.509 CRL. + string pem_crl = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The location where 'pem_crl' can be accessed. + string access_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was updated. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] corresponds to a signed X.509 certificate issued by a +// [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. +message Certificate { + option (google.api.resource) = { + type: "privateca.googleapis.com/Certificate" + pattern: "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificates/{certificate}" + }; + + // Describes fields that are relavent to the revocation of a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + message RevocationDetails { + // Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked. + RevocationReason revocation_state = 1; + + // The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked. + google.protobuf.Timestamp revocation_time = 2; + } + + // Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format + // `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The config used to create a signed X.509 certificate. + oneof certificate_config { + // Immutable. A pem-encoded X.509 certificate signing request (CSR). + string pem_csr = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. A description of the certificate and key that does not require X.509 or + // ASN.1. + CertificateConfig config = 3 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Required. The desired lifetime of a certificate. Used to create the + // "not_before_time" and "not_after_time" fields inside an X.509 + // certificate. Note that the lifetime may be truncated if it would extend + // past the life of any certificate authority in the issuing chain. + google.protobuf.Duration lifetime = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This + // [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present. + RevocationDetails revocation_details = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pem-encoded, signed X.509 certificate. + string pem_certificate = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A structured description of the issued X.509 certificate. + CertificateDescription certificate_description = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The chain that may be used to verify the X.509 certificate. Expected to be + // in issuer-to-root order according to RFC 5246. + repeated string pem_certificate_chain = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created. + google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated. + google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] refers to a managed [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues]. Those, in +// turn, are used to describe certain fields of an X.509 certificate, such as +// the key usage fields, fields specific to CA certificates, certificate policy +// extensions and custom extensions. +message ReusableConfig { + option (google.api.resource) = { + type: "privateca.googleapis.com/ReusableConfig" + pattern: "projects/{project}/locations/{location}/reusableConfigs/{reusable_config}" + }; + + // Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format + // `projects/*/locations/*/reusableConfigs/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The config values. + ReusableConfigValues values = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A human-readable description of scenarios these ReusableConfigValues may be + // compatible with. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] is used to describe certain fields of an +// X.509 certificate, such as the key usage fields, fields specific to CA +// certificates, certificate policy extensions and custom extensions. +message ReusableConfigValues { + // Describes values that are relevant in a CA certificate. + message CaOptions { + // Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this + // value is missing, the extension will be omitted from the CA certificate. + google.protobuf.BoolValue is_ca = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Refers to the path length restriction X.509 extension. For a CA + // certificate, this value describes the depth of subordinate CA + // certificates that are allowed. + // If this value is less than 0, the request will fail. + // If this value is missing, the max path length will be omitted from the + // CA certificate. + google.protobuf.Int32Value max_issuer_path_length = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Indicates the intended use for keys that correspond to a certificate. + KeyUsage key_usage = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are + // relevant in a CA certificate. + CaOptions ca_options = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes the X.509 certificate policy object identifiers, per + // https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280 + repeated ObjectId policy_ids = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses + // that appear in the "Authority Information Access" extension in the + // certificate. + repeated string aia_ocsp_servers = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes custom X.509 extensions. + repeated X509Extension additional_extensions = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] describes values that may assist in creating an +// X.509 certificate, or a reference to a pre-defined set of values. +message ReusableConfigWrapper { + // Reusable or inline config values. + oneof config_values { + // Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format + // `projects/*/locations/*/reusableConfigs/*`. + string reusable_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues]. + ReusableConfigValues reusable_config_values = 2 [(google.api.field_behavior) = REQUIRED]; + } +} + +// Describes a subordinate CA's issuers. This is either a resource path to a +// known issuing [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], or a PEM issuer certificate chain. +message SubordinateConfig { + // This message describes a subordinate CA's issuer certificate chain. This + // wrapper exists for compatibility reasons. + message SubordinateConfigChain { + // Required. Expected to be in leaf-to-root order according to RFC 5246. + repeated string pem_certificates = 1 [(google.api.field_behavior) = REQUIRED]; + } + + oneof subordinate_config { + // Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that + // was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field + // is used for information and usability purposes only. The resource name + // is in the format `projects/*/locations/*/certificateAuthorities/*`. + string certificate_authority = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Contains the PEM certificate chain for the issuers of this + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself. + SubordinateConfigChain pem_issuer_chain = 2 [(google.api.field_behavior) = REQUIRED]; + } +} + +// A [PublicKey][google.cloud.security.privateca.v1beta1.PublicKey] describes a public key. +message PublicKey { + // Types of public keys that are supported. + // At a minimum, we support RSA and ECDSA, for the key sizes or curves listed: + // https://cloud.google.com/kms/docs/algorithms#asymmetric_signing_algorithms + enum KeyType { + // Default unspecified value. + KEY_TYPE_UNSPECIFIED = 0; + + // A PEM-encoded PKCS#1/RFC 3447 RSAPrivateKey structure. + PEM_RSA_KEY = 1; + + // A PEM-encoded compressed NIST P-256/secp256r1/prime256v1 or P-384 key. + PEM_EC_KEY = 2; + } + + // Required. The type of public key. + KeyType type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A public key. Padding and encoding varies by 'KeyType' and is described + // along with the KeyType values. + bytes key = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig] describes an X.509 certificate or CSR that is to be +// created, as an alternative to using ASN.1. +message CertificateConfig { + // These values are used to create the distinguished name and subject + // alternative name fields in an X.509 certificate. + message SubjectConfig { + // Required. Contains distinguished name fields such as the location and organization. + Subject subject = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The "common name" of the distinguished name. + string common_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The subject alternative name fields. + SubjectAltNames subject_alt_name = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Specifies some of the values in a certificate that are related to the + // subject. + SubjectConfig subject_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Describes how some of the technical fields in a certificate should be + // populated. + ReusableConfigWrapper reusable_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The public key that corresponds to this config. This is, for example, used + // when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a + // self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR. + PublicKey public_key = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [CertificateDescription][google.cloud.security.privateca.v1beta1.CertificateDescription] describes an X.509 certificate or CSR that has +// been issued, as an alternative to using ASN.1 / X.509. +message CertificateDescription { + // These values describe fields in an issued X.509 certificate such as the + // distinguished name, subject alternative names, serial number, and lifetime. + message SubjectDescription { + // Contains distinguished name fields such as the location and organization. + Subject subject = 1; + + // The "common name" of the distinguished name. + string common_name = 2; + + // The subject alternative name fields. + SubjectAltNames subject_alt_name = 3; + + // The serial number encoded in lowercase hexadecimal. + string hex_serial_number = 4; + + // For convenience, the actual lifetime of an issued certificate. + // Corresponds to 'not_after_time' - 'not_before_time'. + google.protobuf.Duration lifetime = 5; + + // The time at which the certificate becomes valid. + google.protobuf.Timestamp not_before_time = 6; + + // The time at which the certificate expires. + google.protobuf.Timestamp not_after_time = 7; + } + + // A KeyId identifies a specific public key, usually by hashing the public + // key. + message KeyId { + // Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most + // likely the 160 bit SHA-1 hash of the public key. + string key_id = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // A group of fingerprints for the x509 certificate. + message CertificateFingerprint { + // The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate. + string sha256_hash = 1; + } + + // Describes some of the values in a certificate that are related to the + // subject and lifetime. + SubjectDescription subject_description = 1; + + // Describes some of the technical fields in a certificate. + ReusableConfigValues config_values = 2; + + // The public key that corresponds to an issued certificate. + PublicKey public_key = 3; + + // Provides a means of identifiying certificates that contain a particular + // public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2. + KeyId subject_key_id = 4; + + // Identifies the subject_key_id of the parent certificate, per + // https://tools.ietf.org/html/rfc5280#section-4.2.1.1 + KeyId authority_key_id = 5; + + // Describes a list of locations to obtain CRL information, i.e. + // the DistributionPoint.fullName described by + // https://tools.ietf.org/html/rfc5280#section-4.2.1.13 + repeated string crl_distribution_points = 6; + + // Describes lists of issuer CA certificate URLs that appear in the + // "Authority Information Access" extension in the certificate. + repeated string aia_issuing_certificate_urls = 7; + + // The hash of the x.509 certificate. + CertificateFingerprint cert_fingerprint = 8; +} + +// An [ObjectId][google.cloud.security.privateca.v1beta1.ObjectId] specifies an object identifier (OID). These provide context +// and describe types in ASN.1 messages. +message ObjectId { + // Required. The parts of an OID path. The most significant parts of the path come + // first. + repeated int32 object_id_path = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// An [X509Extension][google.cloud.security.privateca.v1beta1.X509Extension] specifies an X.509 extension, which may be used in +// different parts of X.509 objects like certificates, CSRs, and CRLs. +message X509Extension { + // Required. The OID for this X.509 extension. + ObjectId object_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Indicates whether or not this extension is critical (i.e., if the client + // does not know how to handle this extension, the client should consider this + // to be an error). + bool critical = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value of this X.509 extension. + bytes value = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A [KeyUsage][google.cloud.security.privateca.v1beta1.KeyUsage] describes key usage values that may appear in an X.509 +// certificate. +message KeyUsage { + // [KeyUsage.KeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions] corresponds to the key usage values + // described in https://tools.ietf.org/html/rfc5280#section-4.2.1.3. + message KeyUsageOptions { + // The key may be used for digital signatures. + bool digital_signature = 1; + + // The key may be used for cryptographic commitments. Note that this may + // also be referred to as "non-repudiation". + bool content_commitment = 2; + + // The key may be used to encipher other keys. + bool key_encipherment = 3; + + // The key may be used to encipher data. + bool data_encipherment = 4; + + // The key may be used in a key agreement protocol. + bool key_agreement = 5; + + // The key may be used to sign certificates. + bool cert_sign = 6; + + // The key may be used sign certificate revocation lists. + bool crl_sign = 7; + + // The key may be used to encipher only. + bool encipher_only = 8; + + // The key may be used to decipher only. + bool decipher_only = 9; + } + + // [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] has fields that correspond to + // certain common OIDs that could be specified as an extended key usage value. + message ExtendedKeyUsageOptions { + // Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW + // server authentication", though regularly used for non-WWW TLS. + bool server_auth = 1; + + // Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW + // client authentication", though regularly used for non-WWW TLS. + bool client_auth = 2; + + // Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of + // downloadable executable code client authentication". + bool code_signing = 3; + + // Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email + // protection". + bool email_protection = 4; + + // Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding + // the hash of an object to a time". + bool time_stamping = 5; + + // Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing + // OCSP responses". + bool ocsp_signing = 6; + } + + // Describes high-level ways in which a key may be used. + KeyUsageOptions base_key_usage = 1; + + // Detailed scenarios in which a key may be used. + ExtendedKeyUsageOptions extended_key_usage = 2; + + // Used to describe extended key usages that are not listed in the + // [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message. + repeated ObjectId unknown_extended_key_usages = 3; +} + +// [Subject][google.cloud.security.privateca.v1beta1.Subject] describes parts of a distinguished name that, in turn, +// describes the subject of the certificate. +message Subject { + // The country code of the subject. + string country_code = 1; + + // The organization of the subject. + string organization = 2; + + // The organizational_unit of the subject. + string organizational_unit = 3; + + // The locality or city of the subject. + string locality = 4; + + // The province, territory, or regional state of the subject. + string province = 5; + + // The street address of the subject. + string street_address = 6; + + // The postal code of the subject. + string postal_code = 7; +} + +// [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] corresponds to a more modern way of listing what +// the asserted identity is in a certificate (i.e., compared to the "common +// name" in the distinguished name). +message SubjectAltNames { + // Contains only valid, fully-qualified host names. + repeated string dns_names = 1; + + // Contains only valid RFC 3986 URIs. + repeated string uris = 2; + + // Contains only valid RFC 2822 E-mail addresses. + repeated string email_addresses = 3; + + // Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses. + repeated string ip_addresses = 4; + + // Contains additional subject alternative name values. + repeated X509Extension custom_sans = 5; +} + +// A [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] indicates whether a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] has been revoked, +// and the reason for revocation. These are standard revocation reasons from RFC +// 5280. +enum RevocationReason { + // Default unspecified value. This value does indicate that a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] + // has been revoked, but that a reason has not been recorded. + REVOCATION_REASON_UNSPECIFIED = 0; + + // Key material for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] may have leaked. + KEY_COMPROMISE = 1; + + // The key material for a certificate authority in the issuing path may have + // leaked. + CERTIFICATE_AUTHORITY_COMPROMISE = 2; + + // The subject or other attributes in this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] have changed. + AFFILIATION_CHANGED = 3; + + // This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] has been superseded. + SUPERSEDED = 4; + + // This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] or entities in the issuing path have ceased to + // operate. + CESSATION_OF_OPERATION = 5; + + // This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] should not be considered valid, it is expected that it + // may become valid in the future. + CERTIFICATE_HOLD = 6; + + // This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] no longer has permission to assert the listed + // attributes. + PRIVILEGE_WITHDRAWN = 7; + + // The authority which determines appropriate attributes for a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] + // may have been compromised. + ATTRIBUTE_AUTHORITY_COMPROMISE = 8; +} diff --git a/proto-google-cloud-security-privateca-v1beta1/src/main/proto/google/cloud/security/privateca/v1beta1/service.proto b/proto-google-cloud-security-privateca-v1beta1/src/main/proto/google/cloud/security/privateca/v1beta1/service.proto new file mode 100644 index 00000000..cda5fde4 --- /dev/null +++ b/proto-google-cloud-security-privateca-v1beta1/src/main/proto/google/cloud/security/privateca/v1beta1/service.proto @@ -0,0 +1,1040 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.security.privateca.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/security/privateca/v1beta1/resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Security.PrivateCA.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1;privateca"; +option java_multiple_files = true; +option java_outer_classname = "PrivateCaProto"; +option java_package = "com.google.cloud.security.privateca.v1beta1"; + +// [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private +// certificate authorities and issued certificates. +service CertificateAuthorityService { + option (google.api.default_host) = "privateca.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc CreateCertificate(CreateCertificateRequest) returns (Certificate) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates" + body: "certificate" + }; + option (google.api.method_signature) = "parent,certificate,certificate_id"; + } + + // Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + rpc GetCertificate(GetCertificateRequest) returns (Certificate) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + rpc ListCertificates(ListCertificatesRequest) returns (ListCertificatesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates" + }; + option (google.api.method_signature) = "parent"; + } + + // Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + rpc RevokeCertificate(RevokeCertificateRequest) returns (Certificate) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}:revoke" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + rpc UpdateCertificate(UpdateCertificateRequest) returns (Certificate) { + option (google.api.http) = { + patch: "/v1beta1/{certificate.name=projects/*/locations/*/certificateAuthorities/*/certificates/*}" + body: "certificate" + }; + option (google.api.method_signature) = "certificate,update_mask"; + } + + // Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state + // [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is + // of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the + // parent Certificate Authority signs a certificate signing request from + // [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation + // process. + rpc ActivateCertificateAuthority(ActivateCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:activate" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location. + rpc CreateCertificateAuthority(CreateCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities" + body: "certificate_authority" + }; + option (google.api.method_signature) = "parent,certificate_authority,certificate_authority_id"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc DisableCertificateAuthority(DisableCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:disable" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc EnableCertificateAuthority(EnableCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:enable" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // that is in state + // [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is + // of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must + // then be signed by the desired parent Certificate Authority, which could be + // another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem + // certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority]. + rpc FetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest) returns (FetchCertificateAuthorityCsrResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:fetch" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc GetCertificateAuthority(GetCertificateAuthorityRequest) returns (CertificateAuthority) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc ListCertificateAuthorities(ListCertificateAuthoritiesRequest) returns (ListCertificateAuthoritiesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities" + }; + option (google.api.method_signature) = "parent"; + } + + // Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion. + rpc RestoreCertificateAuthority(RestoreCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion. + rpc ScheduleDeleteCertificateAuthority(ScheduleDeleteCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:scheduleDelete" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc UpdateCertificateAuthority(UpdateCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{certificate_authority.name=projects/*/locations/*/certificateAuthorities/*}" + body: "certificate_authority" + }; + option (google.api.method_signature) = "certificate_authority,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Create a new [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in a given Project, Location + // for a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc CreateCertificateRevocationList(CreateCertificateRevocationListRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists" + body: "certificate_revocation_list" + }; + option (google.api.method_signature) = "parent,certificate_revocation_list,certificate_revocation_list_id"; + option (google.longrunning.operation_info) = { + response_type: "CertificateRevocationList" + metadata_type: "OperationMetadata" + }; + } + + // Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + rpc GetCertificateRevocationList(GetCertificateRevocationListRequest) returns (CertificateRevocationList) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + rpc ListCertificateRevocationLists(ListCertificateRevocationListsRequest) returns (ListCertificateRevocationListsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists" + }; + option (google.api.method_signature) = "parent"; + } + + // Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + rpc UpdateCertificateRevocationList(UpdateCertificateRevocationListRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{certificate_revocation_list.name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}" + body: "certificate_revocation_list" + }; + option (google.api.method_signature) = "certificate_revocation_list,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "CertificateRevocationList" + metadata_type: "OperationMetadata" + }; + } + + // Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a given Project and Location. + rpc CreateReusableConfig(CreateReusableConfigRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/reusableConfigs" + body: "reusable_config" + }; + option (google.api.method_signature) = "parent,reusable_config,reusable_config_id"; + option (google.longrunning.operation_info) = { + response_type: "ReusableConfig" + metadata_type: "OperationMetadata" + }; + } + + // DeleteReusableConfig deletes a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + rpc DeleteReusableConfig(DeleteReusableConfigRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.security.privateca.v1beta1.OperationMetadata" + }; + } + + // Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + rpc GetReusableConfig(GetReusableConfigRequest) returns (ReusableConfig) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig]. + rpc ListReusableConfigs(ListReusableConfigsRequest) returns (ListReusableConfigsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/reusableConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Update a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + rpc UpdateReusableConfig(UpdateReusableConfigRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{reusable_config.name=projects/*/locations/*/reusableConfigs/*}" + body: "reusable_config" + }; + option (google.api.method_signature) = "reusable_config,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ReusableConfig" + metadata_type: "OperationMetadata" + }; + } +} + +// Request message for [CertificateAuthorityService.CreateCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate]. +message CreateCertificateRequest { + // Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format + // `projects/*/locations/*/certificateAuthorities/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier], + // but is optional and its value is ignored otherwise. + string certificate_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values. + Certificate certificate = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.GetCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate]. +message GetCertificateRequest { + // Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/Certificate" + } + ]; +} + +// Request message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates]. +message ListCertificatesRequest { + // Required. The resource name of the location associated with the + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format + // `projects/*/locations/*/certificateauthorities/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. Limit on the number of + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] to include in the + // response. Further [Certificates][google.cloud.security.privateca.v1beta1.Certificate] can subsequently be obtained + // by including the + // [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token] in a subsequent + // request. If unspecified, the server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates]. +message ListCertificatesResponse { + // The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + repeated Certificate certificates = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListCertificatesRequest.next_page_token][] to retrieve the + // next page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.RevokeCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate]. +message RevokeCertificateRequest { + // Required. The resource name for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the + // format `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/Certificate" + } + ]; + + // Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate. + RevocationReason reason = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID 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 [CertificateAuthorityService.UpdateCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate]. +message UpdateCertificateRequest { + // Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values. + Certificate certificate = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID 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 +// [CertificateAuthorityService.ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority]. +message ActivateCertificateAuthorityRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Required. The signed CA certificate issued from + // [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr]. + string pem_ca_certificate = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Must include information about the issuer of 'pem_ca_certificate', and any + // further issuers until the self-signed CA. + SubordinateConfig subordinate_config = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.CreateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority]. +message CreateCertificateAuthorityRequest { + // Required. The resource name of the location associated with the + // [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9-]{1,63}` + string certificate_authority_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values. + CertificateAuthority certificate_authority = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.DisableCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority]. +message DisableCertificateAuthorityRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.EnableCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority]. +message EnableCertificateAuthorityRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr]. +message FetchCertificateAuthorityCsrRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; +} + +// Response message for +// [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr]. +message FetchCertificateAuthorityCsrResponse { + // Output only. The PEM-encoded signed certificate signing request (CSR). + string pem_csr = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for [CertificateAuthorityService.GetCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority]. +message GetCertificateAuthorityRequest { + // Required. The [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to + // get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; +} + +// Request message for +// [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities]. +message ListCertificateAuthoritiesRequest { + // Required. The resource name of the location associated with the + // [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] to + // include in the response. + // Further [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] can subsequently be + // obtained by including the + // [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent + // request. If unspecified, the server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities]. +message ListCertificateAuthoritiesResponse { + // The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + repeated CertificateAuthority certificate_authorities = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListCertificateAuthoritiesRequest.next_page_token][] to retrieve the next + // page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.RestoreCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority]. +message RestoreCertificateAuthorityRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.ScheduleDeleteCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority]. +message ScheduleDeleteCertificateAuthorityRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.UpdateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority]. +message UpdateCertificateAuthorityRequest { + // Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values. + CertificateAuthority certificate_authority = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID 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 +// [CertificateAuthorityService.CreateCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateRevocationList]. +message CreateCertificateRevocationListRequest { + // Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format + // `projects/*/locations/*/certificateAuthorities/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Required. It must be unique within a location and match the regular expression + // `[a-zA-Z0-9-]{1,63}` + string certificate_revocation_list_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values. + CertificateRevocationList certificate_revocation_list = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.GetCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList]. +message GetCertificateRevocationListRequest { + // Required. The [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the + // [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateRevocationList" + } + ]; +} + +// Request message for +// [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists]. +message ListCertificateRevocationListsRequest { + // Required. The resource name of the location associated with the + // [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format + // `projects/*/locations/*/certificateauthorities/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. Limit on the number of + // [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to include in the + // response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + // can subsequently be obtained by including the + // [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent + // request. If unspecified, the server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists]. +message ListCertificateRevocationListsResponse { + // The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + repeated CertificateRevocationList certificate_revocation_lists = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListCertificateRevocationListsRequest.next_page_token][] to retrieve the + // next page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.UpdateCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList]. +message UpdateCertificateRevocationListRequest { + // Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values. + CertificateRevocationList certificate_revocation_list = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID 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 +// [CertificateAuthorityService.CreateReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateReusableConfig]. +message CreateReusableConfigRequest { + // Required. The resource name of the location associated with the + // [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9-]{1,63}` + string reusable_config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values. + ReusableConfig reusable_config = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.DeleteReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DeleteReusableConfig]. +message DeleteReusableConfigRequest { + // Required. The resource name for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format + // `projects/*/locations/*/reusableConfigs/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/ReusableConfig" + } + ]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.GetReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig]. +message GetReusableConfigRequest { + // Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/ReusableConfig" + } + ]; +} + +// Request message for +// [CertificateAuthorityService.ListReusableConfigs][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs]. +message ListReusableConfigsRequest { + // Required. The resource name of the location associated with the + // [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Limit on the number of + // [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] to include in the response. + // Further [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] can subsequently be + // obtained by including the + // [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token] in a subsequent request. If + // unspecified, the server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.ListReusableConfigs][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs]. +message ListReusableConfigsResponse { + // The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig]. + repeated ReusableConfig reusable_configs = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListReusableConfigsRequest.next_page_token][] to retrieve + // the next page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.UpdateReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateReusableConfig]. +message UpdateReusableConfigRequest { + // Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values. + ReusableConfig reusable_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An 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. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..f65095ef --- /dev/null +++ b/renovate.json @@ -0,0 +1,81 @@ +{ + "extends": [ + ":separateMajorReleases", + ":combinePatchMinorReleases", + ":ignoreUnstable", + ":prImmediately", + ":updateNotScheduled", + ":automergeDisabled", + ":ignoreModulesAndTests", + ":maintainLockFilesDisabled", + ":autodetectPinVersions" + ], + "packageRules": [ + { + "packagePatterns": [ + "^com.google.guava:" + ], + "versionScheme": "docker" + }, + { + "packagePatterns": [ + "^com.google.api:gax", + "^com.google.auth:", + "^com.google.cloud:google-cloud-core", + "^io.grpc:", + "^com.google.guava:" + ], + "groupName": "core dependencies" + }, + { + "packagePatterns": [ + "^com.google.http-client:", + "^com.google.oauth-client:", + "^com.google.api-client:" + ], + "groupName": "core transport dependencies" + }, + { + "packagePatterns": [ + "*" + ], + "semanticCommitType": "deps", + "semanticCommitScope": null + }, + { + "packagePatterns": [ + "^org.apache.maven", + "^org.jacoco:", + "^org.codehaus.mojo:", + "^org.sonatype.plugins:", + "^com.coveo:", + "^com.google.cloud:google-cloud-shared-config" + ], + "semanticCommitType": "build", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-security-privateca", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-" + ], + "ignoreUnstable": false + }, + { + "packagePatterns": [ + "^com.fasterxml.jackson.core" + ], + "groupName": "jackson dependencies" + } + ], + "semanticCommits": true, + "masterIssue": true +} \ No newline at end of file diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 00000000..01b74819 --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + security-privateca-install-without-bom + jar + Google Certificate Authority Service Install Without Bom + https://github.com/googleapis/java-security-privateca + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-security-privateca + 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..77626a2a --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-security-privateca-samples + 0.0.1-SNAPSHOT + pom + Google Certificate Authority Service Samples Parent + https://github.com/googleapis/java-security-privateca + + 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..0b05232a --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + security-privateca-snapshot + jar + Google Certificate Authority Service Snapshot Samples + https://github.com/googleapis/java-security-privateca + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-security-privateca + 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..248430d1 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + security-privateca-snippets + jar + Google Certificate Authority Service Snippets + https://github.com/googleapis/java-security-privateca + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-security-privateca + 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..355eab18 --- /dev/null +++ b/synth.metadata @@ -0,0 +1,35 @@ +{ + "sources": [ + { + "git": { + "name": "." + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "7a906c83566d0d429b23da434a4dc2b4de7b117a", + "internalRef": "331220195" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "b15c0c042cdea746fc19856527d8baf947c3c220" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "security-privateca", + "apiVersion": "v1beta1", + "language": "java", + "generator": "bazel" + } + } + ] +} \ No newline at end of file diff --git a/synth.py b/synth.py new file mode 100644 index 00000000..59956651 --- /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 = 'security-privateca' +versions = ['v1beta1'] + +for version in versions: + java.bazel_library( + service=service, + version=version, + proto_path=f'google/cloud/security/privateca/{version}', + bazel_target=f'//google/cloud/security/privateca/{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..f0b2a448 --- /dev/null +++ b/versions.txt @@ -0,0 +1,6 @@ +# Format: +# module:released-version:current-version + +google-cloud-security-privateca:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-security-privateca-v1beta1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-security-privateca-v1beta1:0.0.0:0.0.1-SNAPSHOT \ No newline at end of file