diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..103b2b6d --- /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-os-config/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. os-config 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..3040d251 --- /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-os-config/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/.gitignore b/.gitignore new file mode 100644 index 00000000..cd79f823 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# Maven +target/ + +# Eclipse +.classpath +.project +.settings + +# Intellij +*.iml +.idea/ + +# python utilities +*.pyc +__pycache__ + +.vscode \ No newline at end of file diff --git a/.kokoro/build.bat b/.kokoro/build.bat new file mode 100644 index 00000000..3d1157d8 --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,3 @@ +:: See documentation in type-shell-output.bat + +"C:\Program Files\Git\bin\bash.exe" github/java-os-config/.kokoro/build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 00000000..a473f511 --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,113 @@ +#!/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_ROOT}/src/${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 \ + -Penable-samples \ + 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-os-config +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..bb819b5e --- /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-os-config/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-os-config/.kokoro/build.sh" +} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 00000000..a3bbc5f6 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,44 @@ +#!/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 retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + echo "${command}" + ${command} + exit_code=$? + + 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 +} diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 00000000..bf3e4097 --- /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-os-config/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-os-config/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/continuous/dependencies.cfg b/.kokoro/continuous/dependencies.cfg new file mode 100644 index 00000000..83a40e44 --- /dev/null +++ b/.kokoro/continuous/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-os-config/.kokoro/dependencies.sh" +} diff --git a/.kokoro/continuous/integration.cfg b/.kokoro/continuous/integration.cfg new file mode 100644 index 00000000..3b017fc8 --- /dev/null +++ b/.kokoro/continuous/integration.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/java8" +} diff --git a/.kokoro/continuous/java11.cfg b/.kokoro/continuous/java11.cfg new file mode 100644 index 00000000..709f2b4c --- /dev/null +++ b/.kokoro/continuous/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/continuous/java7.cfg b/.kokoro/continuous/java7.cfg new file mode 100644 index 00000000..cb24f44e --- /dev/null +++ b/.kokoro/continuous/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/continuous/java8-osx.cfg b/.kokoro/continuous/java8-osx.cfg new file mode 100644 index 00000000..863b9d4c --- /dev/null +++ b/.kokoro/continuous/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-os-config/.kokoro/build.sh" diff --git a/.kokoro/continuous/java8-win.cfg b/.kokoro/continuous/java8-win.cfg new file mode 100644 index 00000000..3f1057d7 --- /dev/null +++ b/.kokoro/continuous/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-os-config/.kokoro/build.bat" diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /dev/null +++ b/.kokoro/continuous/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/continuous/lint.cfg b/.kokoro/continuous/lint.cfg new file mode 100644 index 00000000..6d323c8a --- /dev/null +++ b/.kokoro/continuous/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/continuous/propose_release.cfg b/.kokoro/continuous/propose_release.cfg new file mode 100644 index 00000000..926eb6d7 --- /dev/null +++ b/.kokoro/continuous/propose_release.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-os-config/.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-os-config/.kokoro/continuous/propose_release.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/continuous/samples.cfg b/.kokoro/continuous/samples.cfg new file mode 100644 index 00000000..fa7b493d --- /dev/null +++ b/.kokoro/continuous/samples.cfg @@ -0,0 +1,31 @@ +# 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" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 00000000..0aade871 --- /dev/null +++ b/.kokoro/dependencies.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. + +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 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..bf3e4097 --- /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-os-config/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-os-config/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/nightly/dependencies.cfg b/.kokoro/nightly/dependencies.cfg new file mode 100644 index 00000000..83a40e44 --- /dev/null +++ b/.kokoro/nightly/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-os-config/.kokoro/dependencies.sh" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg new file mode 100644 index 00000000..8bf59c02 --- /dev/null +++ b/.kokoro/nightly/integration.cfg @@ -0,0 +1,21 @@ +# 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: "ENABLE_BUILD_COP" + value: "true" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "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..863b9d4c --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-os-config/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 00000000..3f1057d7 --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-os-config/.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/lint.cfg b/.kokoro/nightly/lint.cfg new file mode 100644 index 00000000..6d323c8a --- /dev/null +++ b/.kokoro/nightly/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/nightly/samples.cfg b/.kokoro/nightly/samples.cfg new file mode 100644 index 00000000..b4b051cd --- /dev/null +++ b/.kokoro/nightly/samples.cfg @@ -0,0 +1,36 @@ +# 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" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} 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..cb3d6f34 --- /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-os-config/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-os-config/.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..83a40e44 --- /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-os-config/.kokoro/dependencies.sh" +} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 00000000..141f90c1 --- /dev/null +++ b/.kokoro/presubmit/integration.cfg @@ -0,0 +1,31 @@ +# 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" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "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..863b9d4c --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-os-config/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 00000000..3f1057d7 --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-os-config/.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..794ae144 --- /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-os-config/.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..fa7b493d --- /dev/null +++ b/.kokoro/presubmit/samples.cfg @@ -0,0 +1,31 @@ +# 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" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 00000000..f3584723 --- /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-os-config/.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-os-config/.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..06264eae --- /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-os-config/.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..ea1a3f8d --- /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-os-config/.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..f53cc750 --- /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-os-config/.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..a1ea9f04 --- /dev/null +++ b/.kokoro/release/publish_javadoc.cfg @@ -0,0 +1,19 @@ +# Format: //devtools/kokoro/config/proto/build.proto +env_vars: { + key: "STAGING_BUCKET" + value: "docs-staging" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-os-config/.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..74fec371 --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2019 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET}" ]]; then + echo "Need to set STAGING_BUCKET environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -DskipTests=true + +NAME=google-cloud-os-config +VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# build the docs +mvn site -B + +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 diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg new file mode 100644 index 00000000..dc368fae --- /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-os-config/.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..0e8dab47 --- /dev/null +++ b/.kokoro/release/stage.cfg @@ -0,0 +1,44 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-os-config/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-os-config/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-os-config" + } +} + +# Fetch the token needed for reporting release status to GitHub +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} + +# Fetch magictoken to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "releasetool-magictoken" + } + } +} + +# Fetch api key to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "magic-github-proxy-api-key" + } + } +} 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..ba17ce01 --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,24 @@ +#!/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 +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.repo-metadata.json b/.repo-metadata.json new file mode 100644 index 00000000..560b26d6 --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,14 @@ +{ + "name": "os-config", + "name_pretty": "OS Config API", + "product_documentation": "https://cloud.google.com/compute/docs/os-patch-management", + "api_description": "provides OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", + "client_documentation": "https://googleapis.dev/java/google-cloud-os-config/latest/index.html", + "release_level": "beta", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-os-config", + "repo_short": "java-os-config", + "distribution_name": "com.google.cloud:google-cloud-os-config", + "api_id": "os-config.googleapis.com" +} \ 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..085021dd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,130 @@ +# 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 + +### 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..eb7dae61 --- /dev/null +++ b/README.md @@ -0,0 +1,163 @@ +# Google OS Config API Client for Java + +Java idiomatic client for [OS Config API][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +## Quickstart + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file +```xml + + + + com.google.cloud + libraries-bom + 4.4.0 + pom + import + + + + + + com.google.cloud + google-cloud-os-config + + +``` + +[//]: # ({x-version-update-start:google-cloud-os-config:released}) + +If you are using Maven without BOM, add this to your dependencies: + +```xml + + com.google.cloud + google-cloud-os-config + 0.0.0 + +``` + +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-os-config:0.0.0' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-os-config" % "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 OS Config API [API enabled][enable-api]. + +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-os-config` library. See the [Quickstart](#quickstart) section +to add `google-cloud-os-config` as a dependency in your code. + +## About OS Config API + + +[OS Config API][product-docs] provides OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances. + +See the [OS Config API client library docs][javadocs] to learn how to +use this OS Config API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +OS Config API uses gRPC for the transport layer. + +## Java Versions + +Java 7 or above is required for using this client. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +[product-docs]: https://cloud.google.com/compute/docs/os-patch-management +[javadocs]: https://googleapis.dev/java/google-cloud-os-config/latest/index.html +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-os-config/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-os-config/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-os-config/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-os-config/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-os-config/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-os-config/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-os-config/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-os-config/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-os-config/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-os-config/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-os-config.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-os-config&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-os-config/blob/master/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-os-config/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-os-config/blob/master/LICENSE + +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=os-config.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-os-config-bom/pom.xml b/google-cloud-os-config-bom/pom.xml new file mode 100644 index 00000000..b0a65f9d --- /dev/null +++ b/google-cloud-os-config-bom/pom.xml @@ -0,0 +1,93 @@ + + + 4.0.0 + com.google.cloud + google-cloud-os-config-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 0.2.1 + + + Google OS Config API BOM + https://github.com/googleapis/java-os-config + + BOM for OS Config API + + + + Google LLC + + + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + + + scm:git:https://github.com/googleapis/java-os-config.git + scm:git:git@github.com:googleapis/java-os-config.git + https://github.com/googleapis/java-os-config + + + + + 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-os-config + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-os-config-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-os-config-v1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + \ No newline at end of file diff --git a/google-cloud-os-config/pom.xml b/google-cloud-os-config/pom.xml new file mode 100644 index 00000000..1bb60018 --- /dev/null +++ b/google-cloud-os-config/pom.xml @@ -0,0 +1,101 @@ + + + 4.0.0 + com.google.cloud + google-cloud-os-config + 0.0.1-SNAPSHOT + jar + Google OS Config API + https://github.com/googleapis/java-os-config + provides OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances. + + com.google.cloud + google-cloud-os-config-parent + 0.0.1-SNAPSHOT + + + google-cloud-os-config + + + + 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-os-config-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + org.threeten + threetenbp + + + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-os-config-v1 + test + + + + com.google.api + gax-grpc + testlib + test + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + \ No newline at end of file diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceClient.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceClient.java new file mode 100644 index 00000000..1e34bdb7 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceClient.java @@ -0,0 +1,555 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.osconfig.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse; +import com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment; +import com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.PatchJob; +import com.google.cloud.osconfig.v1.stub.OsConfigServiceStub; +import com.google.cloud.osconfig.v1.stub.OsConfigServiceStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: OS Config API + * + *

The OS Config service is a server-side component that you can use to manage package + * installations and patch jobs for virtual machine instances. + * + *

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 (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+ *   ExecutePatchJobRequest request = ExecutePatchJobRequest.newBuilder().build();
+ *   PatchJob response = osConfigServiceClient.executePatchJob(request);
+ * }
+ * 
+ * 
+ * + *

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

To customize credentials: + * + *

+ * 
+ * OsConfigServiceSettings osConfigServiceSettings =
+ *     OsConfigServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * OsConfigServiceClient osConfigServiceClient =
+ *     OsConfigServiceClient.create(osConfigServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * OsConfigServiceSettings osConfigServiceSettings =
+ *     OsConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * OsConfigServiceClient osConfigServiceClient =
+ *     OsConfigServiceClient.create(osConfigServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class OsConfigServiceClient implements BackgroundResource { + private final OsConfigServiceSettings settings; + private final OsConfigServiceStub stub; + + /** Constructs an instance of OsConfigServiceClient with default settings. */ + public static final OsConfigServiceClient create() throws IOException { + return create(OsConfigServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of OsConfigServiceClient, 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 OsConfigServiceClient create(OsConfigServiceSettings settings) + throws IOException { + return new OsConfigServiceClient(settings); + } + + /** + * Constructs an instance of OsConfigServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer to use OsConfigServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final OsConfigServiceClient create(OsConfigServiceStub stub) { + return new OsConfigServiceClient(stub); + } + + /** + * Constructs an instance of OsConfigServiceClient, 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 OsConfigServiceClient(OsConfigServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((OsConfigServiceStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected OsConfigServiceClient(OsConfigServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final OsConfigServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public OsConfigServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Patch VM instances by creating and running a patch job. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   ExecutePatchJobRequest request = ExecutePatchJobRequest.newBuilder().build();
+   *   PatchJob response = osConfigServiceClient.executePatchJob(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 PatchJob executePatchJob(ExecutePatchJobRequest request) { + return executePatchJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Patch VM instances by creating and running a patch job. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   ExecutePatchJobRequest request = ExecutePatchJobRequest.newBuilder().build();
+   *   ApiFuture<PatchJob> future = osConfigServiceClient.executePatchJobCallable().futureCall(request);
+   *   // Do something
+   *   PatchJob response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable executePatchJobCallable() { + return stub.executePatchJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get the patch job. This can be used to track the progress of an ongoing patch job or review the + * details of completed jobs. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GetPatchJobRequest request = GetPatchJobRequest.newBuilder().build();
+   *   PatchJob response = osConfigServiceClient.getPatchJob(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 PatchJob getPatchJob(GetPatchJobRequest request) { + return getPatchJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get the patch job. This can be used to track the progress of an ongoing patch job or review the + * details of completed jobs. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GetPatchJobRequest request = GetPatchJobRequest.newBuilder().build();
+   *   ApiFuture<PatchJob> future = osConfigServiceClient.getPatchJobCallable().futureCall(request);
+   *   // Do something
+   *   PatchJob response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getPatchJobCallable() { + return stub.getPatchJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   CancelPatchJobRequest request = CancelPatchJobRequest.newBuilder().build();
+   *   PatchJob response = osConfigServiceClient.cancelPatchJob(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 PatchJob cancelPatchJob(CancelPatchJobRequest request) { + return cancelPatchJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   CancelPatchJobRequest request = CancelPatchJobRequest.newBuilder().build();
+   *   ApiFuture<PatchJob> future = osConfigServiceClient.cancelPatchJobCallable().futureCall(request);
+   *   // Do something
+   *   PatchJob response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable cancelPatchJobCallable() { + return stub.cancelPatchJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get a list of patch jobs. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   ListPatchJobsRequest request = ListPatchJobsRequest.newBuilder().build();
+   *   ListPatchJobsResponse response = osConfigServiceClient.listPatchJobs(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 ListPatchJobsResponse listPatchJobs(ListPatchJobsRequest request) { + return listPatchJobsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get a list of patch jobs. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   ListPatchJobsRequest request = ListPatchJobsRequest.newBuilder().build();
+   *   ApiFuture<ListPatchJobsResponse> future = osConfigServiceClient.listPatchJobsCallable().futureCall(request);
+   *   // Do something
+   *   ListPatchJobsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable listPatchJobsCallable() { + return stub.listPatchJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get a list of instance details for a given patch job. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   ListPatchJobInstanceDetailsRequest request = ListPatchJobInstanceDetailsRequest.newBuilder().build();
+   *   ListPatchJobInstanceDetailsResponse response = osConfigServiceClient.listPatchJobInstanceDetails(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 ListPatchJobInstanceDetailsResponse listPatchJobInstanceDetails( + ListPatchJobInstanceDetailsRequest request) { + return listPatchJobInstanceDetailsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get a list of instance details for a given patch job. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   ListPatchJobInstanceDetailsRequest request = ListPatchJobInstanceDetailsRequest.newBuilder().build();
+   *   ApiFuture<ListPatchJobInstanceDetailsResponse> future = osConfigServiceClient.listPatchJobInstanceDetailsCallable().futureCall(request);
+   *   // Do something
+   *   ListPatchJobInstanceDetailsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable< + ListPatchJobInstanceDetailsRequest, ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsCallable() { + return stub.listPatchJobInstanceDetailsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create an OS Config patch deployment. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   CreatePatchDeploymentRequest request = CreatePatchDeploymentRequest.newBuilder().build();
+   *   PatchDeployment response = osConfigServiceClient.createPatchDeployment(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 PatchDeployment createPatchDeployment(CreatePatchDeploymentRequest request) { + return createPatchDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Create an OS Config patch deployment. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   CreatePatchDeploymentRequest request = CreatePatchDeploymentRequest.newBuilder().build();
+   *   ApiFuture<PatchDeployment> future = osConfigServiceClient.createPatchDeploymentCallable().futureCall(request);
+   *   // Do something
+   *   PatchDeployment response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + createPatchDeploymentCallable() { + return stub.createPatchDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get an OS Config patch deployment. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GetPatchDeploymentRequest request = GetPatchDeploymentRequest.newBuilder().build();
+   *   PatchDeployment response = osConfigServiceClient.getPatchDeployment(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 PatchDeployment getPatchDeployment(GetPatchDeploymentRequest request) { + return getPatchDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get an OS Config patch deployment. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GetPatchDeploymentRequest request = GetPatchDeploymentRequest.newBuilder().build();
+   *   ApiFuture<PatchDeployment> future = osConfigServiceClient.getPatchDeploymentCallable().futureCall(request);
+   *   // Do something
+   *   PatchDeployment response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + getPatchDeploymentCallable() { + return stub.getPatchDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get a page of OS Config patch deployments. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   ListPatchDeploymentsRequest request = ListPatchDeploymentsRequest.newBuilder().build();
+   *   ListPatchDeploymentsResponse response = osConfigServiceClient.listPatchDeployments(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 ListPatchDeploymentsResponse listPatchDeployments( + ListPatchDeploymentsRequest request) { + return listPatchDeploymentsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get a page of OS Config patch deployments. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   ListPatchDeploymentsRequest request = ListPatchDeploymentsRequest.newBuilder().build();
+   *   ApiFuture<ListPatchDeploymentsResponse> future = osConfigServiceClient.listPatchDeploymentsCallable().futureCall(request);
+   *   // Do something
+   *   ListPatchDeploymentsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + listPatchDeploymentsCallable() { + return stub.listPatchDeploymentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Delete an OS Config patch deployment. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   DeletePatchDeploymentRequest request = DeletePatchDeploymentRequest.newBuilder().build();
+   *   osConfigServiceClient.deletePatchDeployment(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePatchDeployment(DeletePatchDeploymentRequest request) { + deletePatchDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Delete an OS Config patch deployment. + * + *

Sample code: + * + *


+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   DeletePatchDeploymentRequest request = DeletePatchDeploymentRequest.newBuilder().build();
+   *   ApiFuture<Void> future = osConfigServiceClient.deletePatchDeploymentCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deletePatchDeploymentCallable() { + return stub.deletePatchDeploymentCallable(); + } + + @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); + } +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceSettings.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceSettings.java new file mode 100644 index 00000000..f53fab0d --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceSettings.java @@ -0,0 +1,285 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.osconfig.v1; + +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.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse; +import com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment; +import com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.PatchJob; +import com.google.cloud.osconfig.v1.stub.OsConfigServiceStubSettings; +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 OsConfigServiceClient}. + * + *

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

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

+ * 
+ * OsConfigServiceSettings.Builder osConfigServiceSettingsBuilder =
+ *     OsConfigServiceSettings.newBuilder();
+ * osConfigServiceSettingsBuilder
+ *     .executePatchJobSettings()
+ *     .setRetrySettings(
+ *         osConfigServiceSettingsBuilder.executePatchJobSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * OsConfigServiceSettings osConfigServiceSettings = osConfigServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class OsConfigServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to executePatchJob. */ + public UnaryCallSettings executePatchJobSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).executePatchJobSettings(); + } + + /** Returns the object with the settings used for calls to getPatchJob. */ + public UnaryCallSettings getPatchJobSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).getPatchJobSettings(); + } + + /** Returns the object with the settings used for calls to cancelPatchJob. */ + public UnaryCallSettings cancelPatchJobSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).cancelPatchJobSettings(); + } + + /** Returns the object with the settings used for calls to listPatchJobs. */ + public UnaryCallSettings listPatchJobsSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).listPatchJobsSettings(); + } + + /** Returns the object with the settings used for calls to listPatchJobInstanceDetails. */ + public UnaryCallSettings + listPatchJobInstanceDetailsSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).listPatchJobInstanceDetailsSettings(); + } + + /** Returns the object with the settings used for calls to createPatchDeployment. */ + public UnaryCallSettings + createPatchDeploymentSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).createPatchDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to getPatchDeployment. */ + public UnaryCallSettings + getPatchDeploymentSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).getPatchDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to listPatchDeployments. */ + public UnaryCallSettings + listPatchDeploymentsSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).listPatchDeploymentsSettings(); + } + + /** Returns the object with the settings used for calls to deletePatchDeployment. */ + public UnaryCallSettings deletePatchDeploymentSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).deletePatchDeploymentSettings(); + } + + public static final OsConfigServiceSettings create(OsConfigServiceStubSettings stub) + throws IOException { + return new OsConfigServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return OsConfigServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return OsConfigServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return OsConfigServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return OsConfigServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return OsConfigServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return OsConfigServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return OsConfigServiceStubSettings.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 OsConfigServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for OsConfigServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(OsConfigServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(OsConfigServiceStubSettings.newBuilder()); + } + + protected Builder(OsConfigServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(OsConfigServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public OsConfigServiceStubSettings.Builder getStubSettingsBuilder() { + return ((OsConfigServiceStubSettings.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 executePatchJob. */ + public UnaryCallSettings.Builder executePatchJobSettings() { + return getStubSettingsBuilder().executePatchJobSettings(); + } + + /** Returns the builder for the settings used for calls to getPatchJob. */ + public UnaryCallSettings.Builder getPatchJobSettings() { + return getStubSettingsBuilder().getPatchJobSettings(); + } + + /** Returns the builder for the settings used for calls to cancelPatchJob. */ + public UnaryCallSettings.Builder cancelPatchJobSettings() { + return getStubSettingsBuilder().cancelPatchJobSettings(); + } + + /** Returns the builder for the settings used for calls to listPatchJobs. */ + public UnaryCallSettings.Builder + listPatchJobsSettings() { + return getStubSettingsBuilder().listPatchJobsSettings(); + } + + /** Returns the builder for the settings used for calls to listPatchJobInstanceDetails. */ + public UnaryCallSettings.Builder< + ListPatchJobInstanceDetailsRequest, ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsSettings() { + return getStubSettingsBuilder().listPatchJobInstanceDetailsSettings(); + } + + /** Returns the builder for the settings used for calls to createPatchDeployment. */ + public UnaryCallSettings.Builder + createPatchDeploymentSettings() { + return getStubSettingsBuilder().createPatchDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to getPatchDeployment. */ + public UnaryCallSettings.Builder + getPatchDeploymentSettings() { + return getStubSettingsBuilder().getPatchDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to listPatchDeployments. */ + public UnaryCallSettings.Builder + listPatchDeploymentsSettings() { + return getStubSettingsBuilder().listPatchDeploymentsSettings(); + } + + /** Returns the builder for the settings used for calls to deletePatchDeployment. */ + public UnaryCallSettings.Builder + deletePatchDeploymentSettings() { + return getStubSettingsBuilder().deletePatchDeploymentSettings(); + } + + @Override + public OsConfigServiceSettings build() throws IOException { + return new OsConfigServiceSettings(this); + } + } +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/package-info.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/package-info.java new file mode 100644 index 00000000..4e797fdf --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/package-info.java @@ -0,0 +1,43 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 Cloud OS Config API. + * + *

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

===================== OsConfigServiceClient ===================== + * + *

Service Description: OS Config API + * + *

The OS Config service is a server-side component that you can use to manage package + * installations and patch jobs for virtual machine instances. + * + *

Sample for OsConfigServiceClient: + * + *

+ * 
+ * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+ *   ExecutePatchJobRequest request = ExecutePatchJobRequest.newBuilder().build();
+ *   PatchJob response = osConfigServiceClient.executePatchJob(request);
+ * }
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +package com.google.cloud.osconfig.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/GrpcOsConfigServiceCallableFactory.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/GrpcOsConfigServiceCallableFactory.java new file mode 100644 index 00000000..197cf479 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/GrpcOsConfigServiceCallableFactory.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.osconfig.v1.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 Cloud OS Config 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 GrpcOsConfigServiceCallableFactory 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-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/GrpcOsConfigServiceStub.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/GrpcOsConfigServiceStub.java new file mode 100644 index 00000000..5b7d6d41 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/GrpcOsConfigServiceStub.java @@ -0,0 +1,437 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.osconfig.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse; +import com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment; +import com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.PatchJob; +import com.google.common.collect.ImmutableMap; +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 Cloud OS Config 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 GrpcOsConfigServiceStub extends OsConfigServiceStub { + + private static final MethodDescriptor + executePatchJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1.OsConfigService/ExecutePatchJob") + .setRequestMarshaller( + ProtoUtils.marshaller(ExecutePatchJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PatchJob.getDefaultInstance())) + .build(); + private static final MethodDescriptor getPatchJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1.OsConfigService/GetPatchJob") + .setRequestMarshaller(ProtoUtils.marshaller(GetPatchJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PatchJob.getDefaultInstance())) + .build(); + private static final MethodDescriptor + cancelPatchJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1.OsConfigService/CancelPatchJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CancelPatchJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PatchJob.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listPatchJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1.OsConfigService/ListPatchJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPatchJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPatchJobsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor< + ListPatchJobInstanceDetailsRequest, ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1.OsConfigService/ListPatchJobInstanceDetails") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPatchJobInstanceDetailsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPatchJobInstanceDetailsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + createPatchDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1.OsConfigService/CreatePatchDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PatchDeployment.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getPatchDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1.OsConfigService/GetPatchDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(GetPatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PatchDeployment.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listPatchDeploymentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1.OsConfigService/ListPatchDeployments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPatchDeploymentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPatchDeploymentsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deletePatchDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1.OsConfigService/DeletePatchDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable executePatchJobCallable; + private final UnaryCallable getPatchJobCallable; + private final UnaryCallable cancelPatchJobCallable; + private final UnaryCallable listPatchJobsCallable; + private final UnaryCallable< + ListPatchJobInstanceDetailsRequest, ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsCallable; + private final UnaryCallable + createPatchDeploymentCallable; + private final UnaryCallable + getPatchDeploymentCallable; + private final UnaryCallable + listPatchDeploymentsCallable; + private final UnaryCallable deletePatchDeploymentCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcOsConfigServiceStub create(OsConfigServiceStubSettings settings) + throws IOException { + return new GrpcOsConfigServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcOsConfigServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcOsConfigServiceStub( + OsConfigServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcOsConfigServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcOsConfigServiceStub( + OsConfigServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcOsConfigServiceStub, 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 GrpcOsConfigServiceStub( + OsConfigServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcOsConfigServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcOsConfigServiceStub, 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 GrpcOsConfigServiceStub( + OsConfigServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings executePatchJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(executePatchJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExecutePatchJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getPatchJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPatchJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetPatchJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings cancelPatchJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelPatchJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CancelPatchJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listPatchJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPatchJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListPatchJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listPatchJobInstanceDetailsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listPatchJobInstanceDetailsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ListPatchJobInstanceDetailsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createPatchDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPatchDeploymentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreatePatchDeploymentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getPatchDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPatchDeploymentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetPatchDeploymentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listPatchDeploymentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPatchDeploymentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListPatchDeploymentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deletePatchDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePatchDeploymentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeletePatchDeploymentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.executePatchJobCallable = + callableFactory.createUnaryCallable( + executePatchJobTransportSettings, settings.executePatchJobSettings(), clientContext); + this.getPatchJobCallable = + callableFactory.createUnaryCallable( + getPatchJobTransportSettings, settings.getPatchJobSettings(), clientContext); + this.cancelPatchJobCallable = + callableFactory.createUnaryCallable( + cancelPatchJobTransportSettings, settings.cancelPatchJobSettings(), clientContext); + this.listPatchJobsCallable = + callableFactory.createUnaryCallable( + listPatchJobsTransportSettings, settings.listPatchJobsSettings(), clientContext); + this.listPatchJobInstanceDetailsCallable = + callableFactory.createUnaryCallable( + listPatchJobInstanceDetailsTransportSettings, + settings.listPatchJobInstanceDetailsSettings(), + clientContext); + this.createPatchDeploymentCallable = + callableFactory.createUnaryCallable( + createPatchDeploymentTransportSettings, + settings.createPatchDeploymentSettings(), + clientContext); + this.getPatchDeploymentCallable = + callableFactory.createUnaryCallable( + getPatchDeploymentTransportSettings, + settings.getPatchDeploymentSettings(), + clientContext); + this.listPatchDeploymentsCallable = + callableFactory.createUnaryCallable( + listPatchDeploymentsTransportSettings, + settings.listPatchDeploymentsSettings(), + clientContext); + this.deletePatchDeploymentCallable = + callableFactory.createUnaryCallable( + deletePatchDeploymentTransportSettings, + settings.deletePatchDeploymentSettings(), + clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable executePatchJobCallable() { + return executePatchJobCallable; + } + + public UnaryCallable getPatchJobCallable() { + return getPatchJobCallable; + } + + public UnaryCallable cancelPatchJobCallable() { + return cancelPatchJobCallable; + } + + public UnaryCallable listPatchJobsCallable() { + return listPatchJobsCallable; + } + + public UnaryCallable + listPatchJobInstanceDetailsCallable() { + return listPatchJobInstanceDetailsCallable; + } + + public UnaryCallable + createPatchDeploymentCallable() { + return createPatchDeploymentCallable; + } + + public UnaryCallable getPatchDeploymentCallable() { + return getPatchDeploymentCallable; + } + + public UnaryCallable + listPatchDeploymentsCallable() { + return listPatchDeploymentsCallable; + } + + public UnaryCallable deletePatchDeploymentCallable() { + return deletePatchDeploymentCallable; + } + + @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-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/OsConfigServiceStub.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/OsConfigServiceStub.java new file mode 100644 index 00000000..f176cbd6 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/OsConfigServiceStub.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.osconfig.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse; +import com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment; +import com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.PatchJob; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud OS Config 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 OsConfigServiceStub implements BackgroundResource { + + public UnaryCallable executePatchJobCallable() { + throw new UnsupportedOperationException("Not implemented: executePatchJobCallable()"); + } + + public UnaryCallable getPatchJobCallable() { + throw new UnsupportedOperationException("Not implemented: getPatchJobCallable()"); + } + + public UnaryCallable cancelPatchJobCallable() { + throw new UnsupportedOperationException("Not implemented: cancelPatchJobCallable()"); + } + + public UnaryCallable listPatchJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listPatchJobsCallable()"); + } + + public UnaryCallable + listPatchJobInstanceDetailsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listPatchJobInstanceDetailsCallable()"); + } + + public UnaryCallable + createPatchDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: createPatchDeploymentCallable()"); + } + + public UnaryCallable getPatchDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: getPatchDeploymentCallable()"); + } + + public UnaryCallable + listPatchDeploymentsCallable() { + throw new UnsupportedOperationException("Not implemented: listPatchDeploymentsCallable()"); + } + + public UnaryCallable deletePatchDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: deletePatchDeploymentCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/OsConfigServiceStubSettings.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/OsConfigServiceStubSettings.java new file mode 100644 index 00000000..d6bb4f84 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/OsConfigServiceStubSettings.java @@ -0,0 +1,498 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.osconfig.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +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.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse; +import com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment; +import com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.PatchJob; +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.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 OsConfigServiceStub}. + * + *

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

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

+ * 
+ * OsConfigServiceStubSettings.Builder osConfigServiceSettingsBuilder =
+ *     OsConfigServiceStubSettings.newBuilder();
+ * osConfigServiceSettingsBuilder
+ *     .executePatchJobSettings()
+ *     .setRetrySettings(
+ *         osConfigServiceSettingsBuilder.executePatchJobSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * OsConfigServiceStubSettings osConfigServiceSettings = osConfigServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class OsConfigServiceStubSettings 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 executePatchJobSettings; + private final UnaryCallSettings getPatchJobSettings; + private final UnaryCallSettings cancelPatchJobSettings; + private final UnaryCallSettings + listPatchJobsSettings; + private final UnaryCallSettings< + ListPatchJobInstanceDetailsRequest, ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsSettings; + private final UnaryCallSettings + createPatchDeploymentSettings; + private final UnaryCallSettings + getPatchDeploymentSettings; + private final UnaryCallSettings + listPatchDeploymentsSettings; + private final UnaryCallSettings + deletePatchDeploymentSettings; + + /** Returns the object with the settings used for calls to executePatchJob. */ + public UnaryCallSettings executePatchJobSettings() { + return executePatchJobSettings; + } + + /** Returns the object with the settings used for calls to getPatchJob. */ + public UnaryCallSettings getPatchJobSettings() { + return getPatchJobSettings; + } + + /** Returns the object with the settings used for calls to cancelPatchJob. */ + public UnaryCallSettings cancelPatchJobSettings() { + return cancelPatchJobSettings; + } + + /** Returns the object with the settings used for calls to listPatchJobs. */ + public UnaryCallSettings listPatchJobsSettings() { + return listPatchJobsSettings; + } + + /** Returns the object with the settings used for calls to listPatchJobInstanceDetails. */ + public UnaryCallSettings + listPatchJobInstanceDetailsSettings() { + return listPatchJobInstanceDetailsSettings; + } + + /** Returns the object with the settings used for calls to createPatchDeployment. */ + public UnaryCallSettings + createPatchDeploymentSettings() { + return createPatchDeploymentSettings; + } + + /** Returns the object with the settings used for calls to getPatchDeployment. */ + public UnaryCallSettings + getPatchDeploymentSettings() { + return getPatchDeploymentSettings; + } + + /** Returns the object with the settings used for calls to listPatchDeployments. */ + public UnaryCallSettings + listPatchDeploymentsSettings() { + return listPatchDeploymentsSettings; + } + + /** Returns the object with the settings used for calls to deletePatchDeployment. */ + public UnaryCallSettings deletePatchDeploymentSettings() { + return deletePatchDeploymentSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public OsConfigServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcOsConfigServiceStub.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 "osconfig.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(OsConfigServiceStubSettings.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 OsConfigServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + executePatchJobSettings = settingsBuilder.executePatchJobSettings().build(); + getPatchJobSettings = settingsBuilder.getPatchJobSettings().build(); + cancelPatchJobSettings = settingsBuilder.cancelPatchJobSettings().build(); + listPatchJobsSettings = settingsBuilder.listPatchJobsSettings().build(); + listPatchJobInstanceDetailsSettings = + settingsBuilder.listPatchJobInstanceDetailsSettings().build(); + createPatchDeploymentSettings = settingsBuilder.createPatchDeploymentSettings().build(); + getPatchDeploymentSettings = settingsBuilder.getPatchDeploymentSettings().build(); + listPatchDeploymentsSettings = settingsBuilder.listPatchDeploymentsSettings().build(); + deletePatchDeploymentSettings = settingsBuilder.deletePatchDeploymentSettings().build(); + } + + /** Builder for OsConfigServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder + executePatchJobSettings; + private final UnaryCallSettings.Builder getPatchJobSettings; + private final UnaryCallSettings.Builder cancelPatchJobSettings; + private final UnaryCallSettings.Builder + listPatchJobsSettings; + private final UnaryCallSettings.Builder< + ListPatchJobInstanceDetailsRequest, ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsSettings; + private final UnaryCallSettings.Builder + createPatchDeploymentSettings; + private final UnaryCallSettings.Builder + getPatchDeploymentSettings; + private final UnaryCallSettings.Builder< + ListPatchDeploymentsRequest, ListPatchDeploymentsResponse> + listPatchDeploymentsSettings; + private final UnaryCallSettings.Builder + deletePatchDeploymentSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", 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(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + executePatchJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getPatchJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + cancelPatchJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listPatchJobsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listPatchJobInstanceDetailsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createPatchDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getPatchDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listPatchDeploymentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deletePatchDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + executePatchJobSettings, + getPatchJobSettings, + cancelPatchJobSettings, + listPatchJobsSettings, + listPatchJobInstanceDetailsSettings, + createPatchDeploymentSettings, + getPatchDeploymentSettings, + listPatchDeploymentsSettings, + deletePatchDeploymentSettings); + + 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 + .executePatchJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getPatchJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .cancelPatchJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listPatchJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listPatchJobInstanceDetailsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createPatchDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getPatchDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listPatchDeploymentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deletePatchDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(OsConfigServiceStubSettings settings) { + super(settings); + + executePatchJobSettings = settings.executePatchJobSettings.toBuilder(); + getPatchJobSettings = settings.getPatchJobSettings.toBuilder(); + cancelPatchJobSettings = settings.cancelPatchJobSettings.toBuilder(); + listPatchJobsSettings = settings.listPatchJobsSettings.toBuilder(); + listPatchJobInstanceDetailsSettings = + settings.listPatchJobInstanceDetailsSettings.toBuilder(); + createPatchDeploymentSettings = settings.createPatchDeploymentSettings.toBuilder(); + getPatchDeploymentSettings = settings.getPatchDeploymentSettings.toBuilder(); + listPatchDeploymentsSettings = settings.listPatchDeploymentsSettings.toBuilder(); + deletePatchDeploymentSettings = settings.deletePatchDeploymentSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + executePatchJobSettings, + getPatchJobSettings, + cancelPatchJobSettings, + listPatchJobsSettings, + listPatchJobInstanceDetailsSettings, + createPatchDeploymentSettings, + getPatchDeploymentSettings, + listPatchDeploymentsSettings, + deletePatchDeploymentSettings); + } + + // 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 executePatchJob. */ + public UnaryCallSettings.Builder executePatchJobSettings() { + return executePatchJobSettings; + } + + /** Returns the builder for the settings used for calls to getPatchJob. */ + public UnaryCallSettings.Builder getPatchJobSettings() { + return getPatchJobSettings; + } + + /** Returns the builder for the settings used for calls to cancelPatchJob. */ + public UnaryCallSettings.Builder cancelPatchJobSettings() { + return cancelPatchJobSettings; + } + + /** Returns the builder for the settings used for calls to listPatchJobs. */ + public UnaryCallSettings.Builder + listPatchJobsSettings() { + return listPatchJobsSettings; + } + + /** Returns the builder for the settings used for calls to listPatchJobInstanceDetails. */ + public UnaryCallSettings.Builder< + ListPatchJobInstanceDetailsRequest, ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsSettings() { + return listPatchJobInstanceDetailsSettings; + } + + /** Returns the builder for the settings used for calls to createPatchDeployment. */ + public UnaryCallSettings.Builder + createPatchDeploymentSettings() { + return createPatchDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to getPatchDeployment. */ + public UnaryCallSettings.Builder + getPatchDeploymentSettings() { + return getPatchDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to listPatchDeployments. */ + public UnaryCallSettings.Builder + listPatchDeploymentsSettings() { + return listPatchDeploymentsSettings; + } + + /** Returns the builder for the settings used for calls to deletePatchDeployment. */ + public UnaryCallSettings.Builder + deletePatchDeploymentSettings() { + return deletePatchDeploymentSettings; + } + + @Override + public OsConfigServiceStubSettings build() throws IOException { + return new OsConfigServiceStubSettings(this); + } + } +} diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/MockOsConfigService.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/MockOsConfigService.java new file mode 100644 index 00000000..26fb22e7 --- /dev/null +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/MockOsConfigService.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.osconfig.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockOsConfigService implements MockGrpcService { + private final MockOsConfigServiceImpl serviceImpl; + + public MockOsConfigService() { + serviceImpl = new MockOsConfigServiceImpl(); + } + + @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-os-config/src/test/java/com/google/cloud/osconfig/v1/MockOsConfigServiceImpl.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/MockOsConfigServiceImpl.java new file mode 100644 index 00000000..5fe1f29e --- /dev/null +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/MockOsConfigServiceImpl.java @@ -0,0 +1,209 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.osconfig.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.osconfig.v1.OsConfigServiceGrpc.OsConfigServiceImplBase; +import com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse; +import com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment; +import com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.PatchJob; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockOsConfigServiceImpl extends OsConfigServiceImplBase { + private List requests; + private Queue responses; + + public MockOsConfigServiceImpl() { + 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 executePatchJob( + ExecutePatchJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof PatchJob) { + requests.add(request); + responseObserver.onNext((PatchJob) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getPatchJob(GetPatchJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof PatchJob) { + requests.add(request); + responseObserver.onNext((PatchJob) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void cancelPatchJob( + CancelPatchJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof PatchJob) { + requests.add(request); + responseObserver.onNext((PatchJob) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listPatchJobs( + ListPatchJobsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListPatchJobsResponse) { + requests.add(request); + responseObserver.onNext((ListPatchJobsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listPatchJobInstanceDetails( + ListPatchJobInstanceDetailsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListPatchJobInstanceDetailsResponse) { + requests.add(request); + responseObserver.onNext((ListPatchJobInstanceDetailsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createPatchDeployment( + CreatePatchDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof PatchDeployment) { + requests.add(request); + responseObserver.onNext((PatchDeployment) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getPatchDeployment( + GetPatchDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof PatchDeployment) { + requests.add(request); + responseObserver.onNext((PatchDeployment) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listPatchDeployments( + ListPatchDeploymentsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListPatchDeploymentsResponse) { + requests.add(request); + responseObserver.onNext((ListPatchDeploymentsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deletePatchDeployment( + DeletePatchDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/OsConfigServiceClientTest.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/OsConfigServiceClientTest.java new file mode 100644 index 00000000..ecf126f6 --- /dev/null +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/OsConfigServiceClientTest.java @@ -0,0 +1,489 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.osconfig.v1; + +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.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest; +import com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse; +import com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment; +import com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest; +import com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse; +import com.google.cloud.osconfig.v1.PatchJobs.PatchJob; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +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 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 OsConfigServiceClientTest { + private static MockOsConfigService mockOsConfigService; + private static MockServiceHelper serviceHelper; + private OsConfigServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockOsConfigService = new MockOsConfigService(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockOsConfigService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + OsConfigServiceSettings settings = + OsConfigServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = OsConfigServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void executePatchJobTest() { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + boolean dryRun = false; + String errorMessage = "errorMessage-1938755376"; + double percentComplete = -1.96096922E8; + String patchDeployment = "patchDeployment633565980"; + PatchJob expectedResponse = + PatchJob.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDescription(description) + .setDryRun(dryRun) + .setErrorMessage(errorMessage) + .setPercentComplete(percentComplete) + .setPatchDeployment(patchDeployment) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + ExecutePatchJobRequest request = ExecutePatchJobRequest.newBuilder().build(); + + PatchJob actualResponse = client.executePatchJob(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExecutePatchJobRequest actualRequest = (ExecutePatchJobRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void executePatchJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + ExecutePatchJobRequest request = ExecutePatchJobRequest.newBuilder().build(); + + client.executePatchJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getPatchJobTest() { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + boolean dryRun = false; + String errorMessage = "errorMessage-1938755376"; + double percentComplete = -1.96096922E8; + String patchDeployment = "patchDeployment633565980"; + PatchJob expectedResponse = + PatchJob.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDescription(description) + .setDryRun(dryRun) + .setErrorMessage(errorMessage) + .setPercentComplete(percentComplete) + .setPatchDeployment(patchDeployment) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + GetPatchJobRequest request = GetPatchJobRequest.newBuilder().build(); + + PatchJob actualResponse = client.getPatchJob(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPatchJobRequest actualRequest = (GetPatchJobRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getPatchJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + GetPatchJobRequest request = GetPatchJobRequest.newBuilder().build(); + + client.getPatchJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void cancelPatchJobTest() { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + boolean dryRun = false; + String errorMessage = "errorMessage-1938755376"; + double percentComplete = -1.96096922E8; + String patchDeployment = "patchDeployment633565980"; + PatchJob expectedResponse = + PatchJob.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDescription(description) + .setDryRun(dryRun) + .setErrorMessage(errorMessage) + .setPercentComplete(percentComplete) + .setPatchDeployment(patchDeployment) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + CancelPatchJobRequest request = CancelPatchJobRequest.newBuilder().build(); + + PatchJob actualResponse = client.cancelPatchJob(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelPatchJobRequest actualRequest = (CancelPatchJobRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void cancelPatchJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + CancelPatchJobRequest request = CancelPatchJobRequest.newBuilder().build(); + + client.cancelPatchJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listPatchJobsTest() { + String nextPageToken = "nextPageToken-1530815211"; + ListPatchJobsResponse expectedResponse = + ListPatchJobsResponse.newBuilder().setNextPageToken(nextPageToken).build(); + mockOsConfigService.addResponse(expectedResponse); + + ListPatchJobsRequest request = ListPatchJobsRequest.newBuilder().build(); + + ListPatchJobsResponse actualResponse = client.listPatchJobs(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPatchJobsRequest actualRequest = (ListPatchJobsRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listPatchJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + ListPatchJobsRequest request = ListPatchJobsRequest.newBuilder().build(); + + client.listPatchJobs(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listPatchJobInstanceDetailsTest() { + String nextPageToken = "nextPageToken-1530815211"; + ListPatchJobInstanceDetailsResponse expectedResponse = + ListPatchJobInstanceDetailsResponse.newBuilder().setNextPageToken(nextPageToken).build(); + mockOsConfigService.addResponse(expectedResponse); + + ListPatchJobInstanceDetailsRequest request = + ListPatchJobInstanceDetailsRequest.newBuilder().build(); + + ListPatchJobInstanceDetailsResponse actualResponse = + client.listPatchJobInstanceDetails(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPatchJobInstanceDetailsRequest actualRequest = + (ListPatchJobInstanceDetailsRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listPatchJobInstanceDetailsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + ListPatchJobInstanceDetailsRequest request = + ListPatchJobInstanceDetailsRequest.newBuilder().build(); + + client.listPatchJobInstanceDetails(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createPatchDeploymentTest() { + String name = "name3373707"; + String description = "description-1724546052"; + PatchDeployment expectedResponse = + PatchDeployment.newBuilder().setName(name).setDescription(description).build(); + mockOsConfigService.addResponse(expectedResponse); + + CreatePatchDeploymentRequest request = CreatePatchDeploymentRequest.newBuilder().build(); + + PatchDeployment actualResponse = client.createPatchDeployment(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePatchDeploymentRequest actualRequest = + (CreatePatchDeploymentRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createPatchDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + CreatePatchDeploymentRequest request = CreatePatchDeploymentRequest.newBuilder().build(); + + client.createPatchDeployment(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getPatchDeploymentTest() { + String name = "name3373707"; + String description = "description-1724546052"; + PatchDeployment expectedResponse = + PatchDeployment.newBuilder().setName(name).setDescription(description).build(); + mockOsConfigService.addResponse(expectedResponse); + + GetPatchDeploymentRequest request = GetPatchDeploymentRequest.newBuilder().build(); + + PatchDeployment actualResponse = client.getPatchDeployment(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPatchDeploymentRequest actualRequest = (GetPatchDeploymentRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getPatchDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + GetPatchDeploymentRequest request = GetPatchDeploymentRequest.newBuilder().build(); + + client.getPatchDeployment(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listPatchDeploymentsTest() { + String nextPageToken = "nextPageToken-1530815211"; + ListPatchDeploymentsResponse expectedResponse = + ListPatchDeploymentsResponse.newBuilder().setNextPageToken(nextPageToken).build(); + mockOsConfigService.addResponse(expectedResponse); + + ListPatchDeploymentsRequest request = ListPatchDeploymentsRequest.newBuilder().build(); + + ListPatchDeploymentsResponse actualResponse = client.listPatchDeployments(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPatchDeploymentsRequest actualRequest = (ListPatchDeploymentsRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listPatchDeploymentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + ListPatchDeploymentsRequest request = ListPatchDeploymentsRequest.newBuilder().build(); + + client.listPatchDeployments(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deletePatchDeploymentTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockOsConfigService.addResponse(expectedResponse); + + DeletePatchDeploymentRequest request = DeletePatchDeploymentRequest.newBuilder().build(); + + client.deletePatchDeployment(request); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePatchDeploymentRequest actualRequest = + (DeletePatchDeploymentRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deletePatchDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + DeletePatchDeploymentRequest request = DeletePatchDeploymentRequest.newBuilder().build(); + + client.deletePatchDeployment(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/grpc-google-cloud-os-config-v1/pom.xml b/grpc-google-cloud-os-config-v1/pom.xml new file mode 100644 index 00000000..47e724b4 --- /dev/null +++ b/grpc-google-cloud-os-config-v1/pom.xml @@ -0,0 +1,56 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-os-config-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-os-config-v1 + GRPC library for grpc-google-cloud-os-config-v1 + + com.google.cloud + google-cloud-os-config-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-os-config-v1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + \ No newline at end of file diff --git a/grpc-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceGrpc.java b/grpc-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceGrpc.java new file mode 100644 index 00000000..03a97f26 --- /dev/null +++ b/grpc-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceGrpc.java @@ -0,0 +1,1369 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.osconfig.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * OS Config API
+ * The OS Config service is a server-side component that you can use to
+ * manage package installations and patch jobs for virtual machine instances.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/osconfig/v1/osconfig_service.proto") +public final class OsConfigServiceGrpc { + + private OsConfigServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.osconfig.v1.OsConfigService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + getExecutePatchJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExecutePatchJob", + requestType = com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest.class, + responseType = com.google.cloud.osconfig.v1.PatchJobs.PatchJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + getExecutePatchJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + getExecutePatchJobMethod; + if ((getExecutePatchJobMethod = OsConfigServiceGrpc.getExecutePatchJobMethod) == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getExecutePatchJobMethod = OsConfigServiceGrpc.getExecutePatchJobMethod) == null) { + OsConfigServiceGrpc.getExecutePatchJobMethod = + getExecutePatchJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecutePatchJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("ExecutePatchJob")) + .build(); + } + } + } + return getExecutePatchJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + getGetPatchJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPatchJob", + requestType = com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest.class, + responseType = com.google.cloud.osconfig.v1.PatchJobs.PatchJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + getGetPatchJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + getGetPatchJobMethod; + if ((getGetPatchJobMethod = OsConfigServiceGrpc.getGetPatchJobMethod) == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getGetPatchJobMethod = OsConfigServiceGrpc.getGetPatchJobMethod) == null) { + OsConfigServiceGrpc.getGetPatchJobMethod = + getGetPatchJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPatchJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("GetPatchJob")) + .build(); + } + } + } + return getGetPatchJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + getCancelPatchJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelPatchJob", + requestType = com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest.class, + responseType = com.google.cloud.osconfig.v1.PatchJobs.PatchJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + getCancelPatchJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + getCancelPatchJobMethod; + if ((getCancelPatchJobMethod = OsConfigServiceGrpc.getCancelPatchJobMethod) == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getCancelPatchJobMethod = OsConfigServiceGrpc.getCancelPatchJobMethod) == null) { + OsConfigServiceGrpc.getCancelPatchJobMethod = + getCancelPatchJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelPatchJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("CancelPatchJob")) + .build(); + } + } + } + return getCancelPatchJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse> + getListPatchJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPatchJobs", + requestType = com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest.class, + responseType = com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse> + getListPatchJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse> + getListPatchJobsMethod; + if ((getListPatchJobsMethod = OsConfigServiceGrpc.getListPatchJobsMethod) == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getListPatchJobsMethod = OsConfigServiceGrpc.getListPatchJobsMethod) == null) { + OsConfigServiceGrpc.getListPatchJobsMethod = + getListPatchJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPatchJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("ListPatchJobs")) + .build(); + } + } + } + return getListPatchJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse> + getListPatchJobInstanceDetailsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPatchJobInstanceDetails", + requestType = com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest.class, + responseType = + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse> + getListPatchJobInstanceDetailsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse> + getListPatchJobInstanceDetailsMethod; + if ((getListPatchJobInstanceDetailsMethod = + OsConfigServiceGrpc.getListPatchJobInstanceDetailsMethod) + == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getListPatchJobInstanceDetailsMethod = + OsConfigServiceGrpc.getListPatchJobInstanceDetailsMethod) + == null) { + OsConfigServiceGrpc.getListPatchJobInstanceDetailsMethod = + getListPatchJobInstanceDetailsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListPatchJobInstanceDetails")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchJobs + .ListPatchJobInstanceDetailsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchJobs + .ListPatchJobInstanceDetailsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier( + "ListPatchJobInstanceDetails")) + .build(); + } + } + } + return getListPatchJobInstanceDetailsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment> + getCreatePatchDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePatchDeployment", + requestType = + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest.class, + responseType = com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment> + getCreatePatchDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment> + getCreatePatchDeploymentMethod; + if ((getCreatePatchDeploymentMethod = OsConfigServiceGrpc.getCreatePatchDeploymentMethod) + == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getCreatePatchDeploymentMethod = OsConfigServiceGrpc.getCreatePatchDeploymentMethod) + == null) { + OsConfigServiceGrpc.getCreatePatchDeploymentMethod = + getCreatePatchDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreatePatchDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchDeployments + .CreatePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("CreatePatchDeployment")) + .build(); + } + } + } + return getCreatePatchDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment> + getGetPatchDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPatchDeployment", + requestType = com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest.class, + responseType = com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment> + getGetPatchDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment> + getGetPatchDeploymentMethod; + if ((getGetPatchDeploymentMethod = OsConfigServiceGrpc.getGetPatchDeploymentMethod) == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getGetPatchDeploymentMethod = OsConfigServiceGrpc.getGetPatchDeploymentMethod) + == null) { + OsConfigServiceGrpc.getGetPatchDeploymentMethod = + getGetPatchDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPatchDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchDeployments + .GetPatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("GetPatchDeployment")) + .build(); + } + } + } + return getGetPatchDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest, + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse> + getListPatchDeploymentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPatchDeployments", + requestType = com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest.class, + responseType = + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest, + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse> + getListPatchDeploymentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest, + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse> + getListPatchDeploymentsMethod; + if ((getListPatchDeploymentsMethod = OsConfigServiceGrpc.getListPatchDeploymentsMethod) + == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getListPatchDeploymentsMethod = OsConfigServiceGrpc.getListPatchDeploymentsMethod) + == null) { + OsConfigServiceGrpc.getListPatchDeploymentsMethod = + getListPatchDeploymentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListPatchDeployments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchDeployments + .ListPatchDeploymentsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchDeployments + .ListPatchDeploymentsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("ListPatchDeployments")) + .build(); + } + } + } + return getListPatchDeploymentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest, + com.google.protobuf.Empty> + getDeletePatchDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePatchDeployment", + requestType = + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest, + com.google.protobuf.Empty> + getDeletePatchDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest, + com.google.protobuf.Empty> + getDeletePatchDeploymentMethod; + if ((getDeletePatchDeploymentMethod = OsConfigServiceGrpc.getDeletePatchDeploymentMethod) + == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getDeletePatchDeploymentMethod = OsConfigServiceGrpc.getDeletePatchDeploymentMethod) + == null) { + OsConfigServiceGrpc.getDeletePatchDeploymentMethod = + getDeletePatchDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeletePatchDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1.PatchDeployments + .DeletePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("DeletePatchDeployment")) + .build(); + } + } + } + return getDeletePatchDeploymentMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static OsConfigServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public OsConfigServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigServiceStub(channel, callOptions); + } + }; + return OsConfigServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static OsConfigServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public OsConfigServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigServiceBlockingStub(channel, callOptions); + } + }; + return OsConfigServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static OsConfigServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public OsConfigServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigServiceFutureStub(channel, callOptions); + } + }; + return OsConfigServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * OS Config API
+   * The OS Config service is a server-side component that you can use to
+   * manage package installations and patch jobs for virtual machine instances.
+   * 
+ */ + public abstract static class OsConfigServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Patch VM instances by creating and running a patch job.
+     * 
+ */ + public void executePatchJob( + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getExecutePatchJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Get the patch job. This can be used to track the progress of an
+     * ongoing patch job or review the details of completed jobs.
+     * 
+ */ + public void getPatchJob( + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetPatchJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Cancel a patch job. The patch job must be active. Canceled patch jobs
+     * cannot be restarted.
+     * 
+ */ + public void cancelPatchJob( + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCancelPatchJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a list of patch jobs.
+     * 
+ */ + public void listPatchJobs( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListPatchJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a list of instance details for a given patch job.
+     * 
+ */ + public void listPatchJobInstanceDetails( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListPatchJobInstanceDetailsMethod(), responseObserver); + } + + /** + * + * + *
+     * Create an OS Config patch deployment.
+     * 
+ */ + public void createPatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreatePatchDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Get an OS Config patch deployment.
+     * 
+ */ + public void getPatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetPatchDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a page of OS Config patch deployments.
+     * 
+ */ + public void listPatchDeployments( + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListPatchDeploymentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete an OS Config patch deployment.
+     * 
+ */ + public void deletePatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeletePatchDeploymentMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getExecutePatchJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob>( + this, METHODID_EXECUTE_PATCH_JOB))) + .addMethod( + getGetPatchJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob>( + this, METHODID_GET_PATCH_JOB))) + .addMethod( + getCancelPatchJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob>( + this, METHODID_CANCEL_PATCH_JOB))) + .addMethod( + getListPatchJobsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse>( + this, METHODID_LIST_PATCH_JOBS))) + .addMethod( + getListPatchJobInstanceDetailsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse>( + this, METHODID_LIST_PATCH_JOB_INSTANCE_DETAILS))) + .addMethod( + getCreatePatchDeploymentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment>( + this, METHODID_CREATE_PATCH_DEPLOYMENT))) + .addMethod( + getGetPatchDeploymentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment>( + this, METHODID_GET_PATCH_DEPLOYMENT))) + .addMethod( + getListPatchDeploymentsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest, + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse>( + this, METHODID_LIST_PATCH_DEPLOYMENTS))) + .addMethod( + getDeletePatchDeploymentMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_PATCH_DEPLOYMENT))) + .build(); + } + } + + /** + * + * + *
+   * OS Config API
+   * The OS Config service is a server-side component that you can use to
+   * manage package installations and patch jobs for virtual machine instances.
+   * 
+ */ + public static final class OsConfigServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private OsConfigServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OsConfigServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Patch VM instances by creating and running a patch job.
+     * 
+ */ + public void executePatchJob( + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getExecutePatchJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get the patch job. This can be used to track the progress of an
+     * ongoing patch job or review the details of completed jobs.
+     * 
+ */ + public void getPatchJob( + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetPatchJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cancel a patch job. The patch job must be active. Canceled patch jobs
+     * cannot be restarted.
+     * 
+ */ + public void cancelPatchJob( + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCancelPatchJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get a list of patch jobs.
+     * 
+ */ + public void listPatchJobs( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListPatchJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get a list of instance details for a given patch job.
+     * 
+ */ + public void listPatchJobInstanceDetails( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListPatchJobInstanceDetailsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create an OS Config patch deployment.
+     * 
+ */ + public void createPatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreatePatchDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get an OS Config patch deployment.
+     * 
+ */ + public void getPatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetPatchDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get a page of OS Config patch deployments.
+     * 
+ */ + public void listPatchDeployments( + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListPatchDeploymentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete an OS Config patch deployment.
+     * 
+ */ + public void deletePatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeletePatchDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * OS Config API
+   * The OS Config service is a server-side component that you can use to
+   * manage package installations and patch jobs for virtual machine instances.
+   * 
+ */ + public static final class OsConfigServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private OsConfigServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OsConfigServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Patch VM instances by creating and running a patch job.
+     * 
+ */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob executePatchJob( + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest request) { + return blockingUnaryCall(getChannel(), getExecutePatchJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get the patch job. This can be used to track the progress of an
+     * ongoing patch job or review the details of completed jobs.
+     * 
+ */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob getPatchJob( + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest request) { + return blockingUnaryCall(getChannel(), getGetPatchJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cancel a patch job. The patch job must be active. Canceled patch jobs
+     * cannot be restarted.
+     * 
+ */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob cancelPatchJob( + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest request) { + return blockingUnaryCall(getChannel(), getCancelPatchJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a list of patch jobs.
+     * 
+ */ + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse listPatchJobs( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest request) { + return blockingUnaryCall(getChannel(), getListPatchJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a list of instance details for a given patch job.
+     * 
+ */ + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + listPatchJobInstanceDetails( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest request) { + return blockingUnaryCall( + getChannel(), getListPatchJobInstanceDetailsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create an OS Config patch deployment.
+     * 
+ */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment createPatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest request) { + return blockingUnaryCall( + getChannel(), getCreatePatchDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get an OS Config patch deployment.
+     * 
+ */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment getPatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest request) { + return blockingUnaryCall( + getChannel(), getGetPatchDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a page of OS Config patch deployments.
+     * 
+ */ + public com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + listPatchDeployments( + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest request) { + return blockingUnaryCall( + getChannel(), getListPatchDeploymentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete an OS Config patch deployment.
+     * 
+ */ + public com.google.protobuf.Empty deletePatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest request) { + return blockingUnaryCall( + getChannel(), getDeletePatchDeploymentMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * OS Config API
+   * The OS Config service is a server-side component that you can use to
+   * manage package installations and patch jobs for virtual machine instances.
+   * 
+ */ + public static final class OsConfigServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private OsConfigServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OsConfigServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Patch VM instances by creating and running a patch job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + executePatchJob(com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getExecutePatchJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get the patch job. This can be used to track the progress of an
+     * ongoing patch job or review the details of completed jobs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + getPatchJob(com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetPatchJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Cancel a patch job. The patch job must be active. Canceled patch jobs
+     * cannot be restarted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1.PatchJobs.PatchJob> + cancelPatchJob(com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getCancelPatchJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get a list of patch jobs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse> + listPatchJobs(com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListPatchJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get a list of instance details for a given patch job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetails( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListPatchJobInstanceDetailsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create an OS Config patch deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment> + createPatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreatePatchDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get an OS Config patch deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment> + getPatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetPatchDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get a page of OS Config patch deployments.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse> + listPatchDeployments( + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListPatchDeploymentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete an OS Config patch deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeletePatchDeploymentMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_EXECUTE_PATCH_JOB = 0; + private static final int METHODID_GET_PATCH_JOB = 1; + private static final int METHODID_CANCEL_PATCH_JOB = 2; + private static final int METHODID_LIST_PATCH_JOBS = 3; + private static final int METHODID_LIST_PATCH_JOB_INSTANCE_DETAILS = 4; + private static final int METHODID_CREATE_PATCH_DEPLOYMENT = 5; + private static final int METHODID_GET_PATCH_DEPLOYMENT = 6; + private static final int METHODID_LIST_PATCH_DEPLOYMENTS = 7; + private static final int METHODID_DELETE_PATCH_DEPLOYMENT = 8; + + 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 OsConfigServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(OsConfigServiceImplBase 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_EXECUTE_PATCH_JOB: + serviceImpl.executePatchJob( + (com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_PATCH_JOB: + serviceImpl.getPatchJob( + (com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CANCEL_PATCH_JOB: + serviceImpl.cancelPatchJob( + (com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PATCH_JOBS: + serviceImpl.listPatchJobs( + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse>) + responseObserver); + break; + case METHODID_LIST_PATCH_JOB_INSTANCE_DETAILS: + serviceImpl.listPatchJobInstanceDetails( + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse>) + responseObserver); + break; + case METHODID_CREATE_PATCH_DEPLOYMENT: + serviceImpl.createPatchDeployment( + (com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment>) + responseObserver); + break; + case METHODID_GET_PATCH_DEPLOYMENT: + serviceImpl.getPatchDeployment( + (com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment>) + responseObserver); + break; + case METHODID_LIST_PATCH_DEPLOYMENTS: + serviceImpl.listPatchDeployments( + (com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse>) + responseObserver); + break; + case METHODID_DELETE_PATCH_DEPLOYMENT: + serviceImpl.deletePatchDeployment( + (com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest) 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 OsConfigServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + OsConfigServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.osconfig.v1.OsConfigProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("OsConfigService"); + } + } + + private static final class OsConfigServiceFileDescriptorSupplier + extends OsConfigServiceBaseDescriptorSupplier { + OsConfigServiceFileDescriptorSupplier() {} + } + + private static final class OsConfigServiceMethodDescriptorSupplier + extends OsConfigServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + OsConfigServiceMethodDescriptorSupplier(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 (OsConfigServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new OsConfigServiceFileDescriptorSupplier()) + .addMethod(getExecutePatchJobMethod()) + .addMethod(getGetPatchJobMethod()) + .addMethod(getCancelPatchJobMethod()) + .addMethod(getListPatchJobsMethod()) + .addMethod(getListPatchJobInstanceDetailsMethod()) + .addMethod(getCreatePatchDeploymentMethod()) + .addMethod(getGetPatchDeploymentMethod()) + .addMethod(getListPatchDeploymentsMethod()) + .addMethod(getDeletePatchDeploymentMethod()) + .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..bca997d5 --- /dev/null +++ b/pom.xml @@ -0,0 +1,256 @@ + + + 4.0.0 + com.google.cloud + google-cloud-os-config-parent + pom + 0.0.1-SNAPSHOT + Google OS Config API Parent + https://github.com/googleapis/java-os-config + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 0.4.0 + + + + + chingor + Jeff Ching + chingor@google.com + Google + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-os-config.git + scm:git:git@github.com:googleapis/java-os-config.git + https://github.com/googleapis/java-os-config + HEAD + + + https://github.com/googleapis/java-os-config/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-os-config-parent + 1.91.1 + 1.8.1 + 1.17.0 + 1.54.0 + 1.27.2 + 3.11.4 + 4.13 + 28.2-android + 1.4.1 + 1.3.2 + 1.18 + + + + + + com.google.cloud + google-cloud-os-config + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-os-config-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-os-config-v1 + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-bom + ${grpc.version} + pom + import + + + com.google.api + gax-bom + ${gax.version} + pom + import + + + com.google.guava + guava-bom + ${guava.version} + pom + import + + + + com.google.protobuf + protobuf-java + ${protobuf.version} + + + com.google.api + api-common + ${google.api-common.version} + + + com.google.api.grpc + proto-google-common-protos + ${google.common-protos.version} + + + org.threeten + threetenbp + ${threeten.version} + + + javax.annotation + javax.annotation-api + ${javax.annotations.version} + + + org.codehaus.mojo + animal-sniffer-annotations + ${animal-sniffer.version} + + + + junit + junit + ${junit.version} + test + + + com.google.api + gax-grpc + ${gax.version} + testlib + test + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + org.objenesis:objenesis + + + + + + + + google-cloud-os-config + proto-google-cloud-os-config-v1 + grpc-google-cloud-os-config-v1 + google-cloud-os-config-bom + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.0.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.1.1 + + + html + + aggregate + javadoc + + + + + none + protected + true + ${project.build.directory}/javadoc + + + Test helpers packages + com.google.cloud.testing + + + SPI packages + com.google.cloud.spi* + + + + + https://grpc.io/grpc-java/javadoc/ + https://developers.google.com/protocol-buffers/docs/reference/java/ + https://googleapis.dev/java/google-auth-library/latest/ + https://googleapis.dev/java/gax/latest/ + https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/ + + + + + + \ No newline at end of file diff --git a/proto-google-cloud-os-config-v1/pom.xml b/proto-google-cloud-os-config-v1/pom.xml new file mode 100644 index 00000000..2366eaf6 --- /dev/null +++ b/proto-google-cloud-os-config-v1/pom.xml @@ -0,0 +1,33 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-os-config-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-os-config-v1 + PROTO library for proto-google-cloud-os-config-v1 + + com.google.cloud + google-cloud-os-config-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 + + + \ No newline at end of file diff --git a/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/OsConfigProto.java b/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/OsConfigProto.java new file mode 100644 index 00000000..6c349a0e --- /dev/null +++ b/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/OsConfigProto.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1/osconfig_service.proto + +package com.google.cloud.osconfig.v1; + +public final class OsConfigProto { + private OsConfigProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/osconfig/v1/osconfig_serv" + + "ice.proto\022\030google.cloud.osconfig.v1\032\034goo" + + "gle/api/annotations.proto\032\027google/api/cl" + + "ient.proto\0320google/cloud/osconfig/v1/pat" + + "ch_deployments.proto\032)google/cloud/oscon" + + "fig/v1/patch_jobs.proto\032\033google/protobuf" + + "/empty.proto2\276\r\n\017OsConfigService\022\235\001\n\017Exe" + + "cutePatchJob\0220.google.cloud.osconfig.v1." + + "ExecutePatchJobRequest\032\".google.cloud.os" + + "config.v1.PatchJob\"4\202\323\344\223\002.\")/v1/{parent=" + + "projects/*}/patchJobs:execute:\001*\022\221\001\n\013Get" + + "PatchJob\022,.google.cloud.osconfig.v1.GetP" + + "atchJobRequest\032\".google.cloud.osconfig.v" + + "1.PatchJob\"0\202\323\344\223\002#\022!/v1/{name=projects/*" + + "/patchJobs/*}\332A\004name\022\232\001\n\016CancelPatchJob\022" + + "/.google.cloud.osconfig.v1.CancelPatchJo" + + "bRequest\032\".google.cloud.osconfig.v1.Patc" + + "hJob\"3\202\323\344\223\002-\"(/v1/{name=projects/*/patch" + + "Jobs/*}:cancel:\001*\022\244\001\n\rListPatchJobs\022..go" + + "ogle.cloud.osconfig.v1.ListPatchJobsRequ" + + "est\032/.google.cloud.osconfig.v1.ListPatch" + + "JobsResponse\"2\202\323\344\223\002#\022!/v1/{parent=projec" + + "ts/*}/patchJobs\332A\006parent\022\340\001\n\033ListPatchJo" + + "bInstanceDetails\022<.google.cloud.osconfig" + + ".v1.ListPatchJobInstanceDetailsRequest\032=" + + ".google.cloud.osconfig.v1.ListPatchJobIn" + + "stanceDetailsResponse\"D\202\323\344\223\0025\0223/v1/{pare" + + "nt=projects/*/patchJobs/*}/instanceDetai" + + "ls\332A\006parent\022\354\001\n\025CreatePatchDeployment\0226." + + "google.cloud.osconfig.v1.CreatePatchDepl" + + "oymentRequest\032).google.cloud.osconfig.v1" + + ".PatchDeployment\"p\202\323\344\223\002<\"(/v1/{parent=pr" + + "ojects/*}/patchDeployments:\020patch_deploy" + + "ment\332A+parent,patch_deployment,patch_dep" + + "loyment_id\022\255\001\n\022GetPatchDeployment\0223.goog" + + "le.cloud.osconfig.v1.GetPatchDeploymentR" + + "equest\032).google.cloud.osconfig.v1.PatchD" + + "eployment\"7\202\323\344\223\002*\022(/v1/{name=projects/*/" + + "patchDeployments/*}\332A\004name\022\300\001\n\024ListPatch" + + "Deployments\0225.google.cloud.osconfig.v1.L" + + "istPatchDeploymentsRequest\0326.google.clou" + + "d.osconfig.v1.ListPatchDeploymentsRespon" + + "se\"9\202\323\344\223\002*\022(/v1/{parent=projects/*}/patc" + + "hDeployments\332A\006parent\022\240\001\n\025DeletePatchDep" + + "loyment\0226.google.cloud.osconfig.v1.Delet" + + "ePatchDeploymentRequest\032\026.google.protobu" + + "f.Empty\"7\202\323\344\223\002**(/v1/{name=projects/*/pa" + + "tchDeployments/*}\332A\004name\032K\312A\027osconfig.go" + + "ogleapis.com\322A.https://www.googleapis.co" + + "m/auth/cloud-platformB\303\001\n\034com.google.clo" + + "ud.osconfig.v1B\rOsConfigProtoZ@google.go" + + "lang.org/genproto/googleapis/cloud/oscon" + + "fig/v1;osconfig\252\002\030Google.Cloud.OsConfig." + + "V1\312\002\030Google\\Cloud\\OsConfig\\V1\352\002\033Google::" + + "Cloud::OsConfig::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.cloud.osconfig.v1.PatchDeployments.getDescriptor(), + com.google.cloud.osconfig.v1.PatchJobs.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.cloud.osconfig.v1.PatchDeployments.getDescriptor(); + com.google.cloud.osconfig.v1.PatchJobs.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/PatchDeployments.java b/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/PatchDeployments.java new file mode 100644 index 00000000..034c62f5 --- /dev/null +++ b/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/PatchDeployments.java @@ -0,0 +1,15964 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1/patch_deployments.proto + +package com.google.cloud.osconfig.v1; + +public final class PatchDeployments { + private PatchDeployments() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public interface PatchDeploymentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.PatchDeployment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Unique name for the patch deployment resource in a project. The patch
+     * deployment name is in the form:
+     * `projects/{project_id}/patchDeployments/{patch_deployment_id}`.
+     * This field is ignored when you create a new patch deployment.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Unique name for the patch deployment resource in a project. The patch
+     * deployment name is in the form:
+     * `projects/{project_id}/patchDeployments/{patch_deployment_id}`.
+     * This field is ignored when you create a new patch deployment.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Optional. Description of the patch deployment. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * Optional. Description of the patch deployment. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Required. VM instances to patch.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instanceFilter field is set. + */ + boolean hasInstanceFilter(); + /** + * + * + *
+     * Required. VM instances to patch.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter getInstanceFilter(); + /** + * + * + *
+     * Required. VM instances to patch.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder(); + + /** + * + * + *
+     * Optional. Patch configuration that is applied.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the patchConfig field is set. + */ + boolean hasPatchConfig(); + /** + * + * + *
+     * Optional. Patch configuration that is applied.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The patchConfig. + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig getPatchConfig(); + /** + * + * + *
+     * Optional. Patch configuration that is applied.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder getPatchConfigOrBuilder(); + + /** + * + * + *
+     * Optional. Duration of the patch. After the duration ends, the patch times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the duration field is set. + */ + boolean hasDuration(); + /** + * + * + *
+     * Optional. Duration of the patch. After the duration ends, the patch times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The duration. + */ + com.google.protobuf.Duration getDuration(); + /** + * + * + *
+     * Optional. Duration of the patch. After the duration ends, the patch times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getDurationOrBuilder(); + + /** + * + * + *
+     * Required. Schedule a one-time execution.
+     * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the oneTimeSchedule field is set. + */ + boolean hasOneTimeSchedule(); + /** + * + * + *
+     * Required. Schedule a one-time execution.
+     * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oneTimeSchedule. + */ + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule getOneTimeSchedule(); + /** + * + * + *
+     * Required. Schedule a one-time execution.
+     * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeScheduleOrBuilder + getOneTimeScheduleOrBuilder(); + + /** + * + * + *
+     * Required. Schedule recurring executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the recurringSchedule field is set. + */ + boolean hasRecurringSchedule(); + /** + * + * + *
+     * Required. Schedule recurring executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurringSchedule. + */ + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule getRecurringSchedule(); + /** + * + * + *
+     * Required. Schedule recurring executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1.PatchDeployments.RecurringScheduleOrBuilder + getRecurringScheduleOrBuilder(); + + /** + * + * + *
+     * Output only. Time the patch deployment was created. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+     * Output only. Time the patch deployment was created. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+     * Output only. Time the patch deployment was created. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+     * Output only. Time the patch deployment was last updated. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+     * Output only. Time the patch deployment was last updated. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+     * Output only. Time the patch deployment was last updated. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+     * Output only. The last time a patch job was started by this deployment.
+     * Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastExecuteTime field is set. + */ + boolean hasLastExecuteTime(); + /** + * + * + *
+     * Output only. The last time a patch job was started by this deployment.
+     * Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecuteTime. + */ + com.google.protobuf.Timestamp getLastExecuteTime(); + /** + * + * + *
+     * Output only. The last time a patch job was started by this deployment.
+     * Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastExecuteTimeOrBuilder(); + + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.ScheduleCase + getScheduleCase(); + } + /** + * + * + *
+   * Patch deployments are configurations that individual patch jobs use to
+   * complete a patch. These configurations include instance filter, package
+   * repository settings, and a schedule. For more information about creating and
+   * managing patch deployments, see [Scheduling patch
+   * jobs](/compute/docs/os-patch-management/schedule-patch-jobs).
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchDeployment} + */ + public static final class PatchDeployment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.PatchDeployment) + PatchDeploymentOrBuilder { + private static final long serialVersionUID = 0L; + // Use PatchDeployment.newBuilder() to construct. + private PatchDeployment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PatchDeployment() { + name_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PatchDeployment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PatchDeployment( + 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(); + + description_ = s; + break; + } + case 26: + { + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder subBuilder = + null; + if (instanceFilter_ != null) { + subBuilder = instanceFilter_.toBuilder(); + } + instanceFilter_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instanceFilter_); + instanceFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder subBuilder = null; + if (patchConfig_ != null) { + subBuilder = patchConfig_.toBuilder(); + } + patchConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(patchConfig_); + patchConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (duration_ != null) { + subBuilder = duration_.toBuilder(); + } + duration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(duration_); + duration_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.Builder subBuilder = + null; + if (scheduleCase_ == 6) { + subBuilder = + ((com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) schedule_) + .toBuilder(); + } + schedule_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) schedule_); + schedule_ = subBuilder.buildPartial(); + } + scheduleCase_ = 6; + break; + } + case 58: + { + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Builder subBuilder = + null; + if (scheduleCase_ == 7) { + subBuilder = + ((com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) schedule_) + .toBuilder(); + } + schedule_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) schedule_); + schedule_ = subBuilder.buildPartial(); + } + scheduleCase_ = 7; + break; + } + case 66: + { + 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 74: + { + 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 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastExecuteTime_ != null) { + subBuilder = lastExecuteTime_.toBuilder(); + } + lastExecuteTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastExecuteTime_); + lastExecuteTime_ = 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.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_PatchDeployment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_PatchDeployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.class, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder.class); + } + + private int scheduleCase_ = 0; + private java.lang.Object schedule_; + + public enum ScheduleCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ONE_TIME_SCHEDULE(6), + RECURRING_SCHEDULE(7), + SCHEDULE_NOT_SET(0); + private final int value; + + private ScheduleCase(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 ScheduleCase valueOf(int value) { + return forNumber(value); + } + + public static ScheduleCase forNumber(int value) { + switch (value) { + case 6: + return ONE_TIME_SCHEDULE; + case 7: + return RECURRING_SCHEDULE; + case 0: + return SCHEDULE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ScheduleCase getScheduleCase() { + return ScheduleCase.forNumber(scheduleCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Unique name for the patch deployment resource in a project. The patch
+     * deployment name is in the form:
+     * `projects/{project_id}/patchDeployments/{patch_deployment_id}`.
+     * This field is ignored when you create a new patch deployment.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + 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; + } + } + /** + * + * + *
+     * Unique name for the patch deployment resource in a project. The patch
+     * deployment name is in the form:
+     * `projects/{project_id}/patchDeployments/{patch_deployment_id}`.
+     * This field is ignored when you create a new patch deployment.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * Optional. Description of the patch deployment. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + 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. Description of the patch deployment. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof 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 INSTANCE_FILTER_FIELD_NUMBER = 3; + private com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter instanceFilter_; + /** + * + * + *
+     * Required. VM instances to patch.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instanceFilter field is set. + */ + public boolean hasInstanceFilter() { + return instanceFilter_ != null; + } + /** + * + * + *
+     * Required. VM instances to patch.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter getInstanceFilter() { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + /** + * + * + *
+     * Required. VM instances to patch.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + return getInstanceFilter(); + } + + public static final int PATCH_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.osconfig.v1.PatchJobs.PatchConfig patchConfig_; + /** + * + * + *
+     * Optional. Patch configuration that is applied.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the patchConfig field is set. + */ + public boolean hasPatchConfig() { + return patchConfig_ != null; + } + /** + * + * + *
+     * Optional. Patch configuration that is applied.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The patchConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig getPatchConfig() { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + /** + * + * + *
+     * Optional. Patch configuration that is applied.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder getPatchConfigOrBuilder() { + return getPatchConfig(); + } + + public static final int DURATION_FIELD_NUMBER = 5; + private com.google.protobuf.Duration duration_; + /** + * + * + *
+     * Optional. Duration of the patch. After the duration ends, the patch times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the duration field is set. + */ + public boolean hasDuration() { + return duration_ != null; + } + /** + * + * + *
+     * Optional. Duration of the patch. After the duration ends, the patch times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The duration. + */ + public com.google.protobuf.Duration getDuration() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + /** + * + * + *
+     * Optional. Duration of the patch. After the duration ends, the patch times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + return getDuration(); + } + + public static final int ONE_TIME_SCHEDULE_FIELD_NUMBER = 6; + /** + * + * + *
+     * Required. Schedule a one-time execution.
+     * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the oneTimeSchedule field is set. + */ + public boolean hasOneTimeSchedule() { + return scheduleCase_ == 6; + } + /** + * + * + *
+     * Required. Schedule a one-time execution.
+     * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oneTimeSchedule. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule getOneTimeSchedule() { + if (scheduleCase_ == 6) { + return (com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) schedule_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.getDefaultInstance(); + } + /** + * + * + *
+     * Required. Schedule a one-time execution.
+     * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.OneTimeScheduleOrBuilder + getOneTimeScheduleOrBuilder() { + if (scheduleCase_ == 6) { + return (com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) schedule_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.getDefaultInstance(); + } + + public static final int RECURRING_SCHEDULE_FIELD_NUMBER = 7; + /** + * + * + *
+     * Required. Schedule recurring executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the recurringSchedule field is set. + */ + public boolean hasRecurringSchedule() { + return scheduleCase_ == 7; + } + /** + * + * + *
+     * Required. Schedule recurring executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurringSchedule. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule getRecurringSchedule() { + if (scheduleCase_ == 7) { + return (com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) schedule_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.getDefaultInstance(); + } + /** + * + * + *
+     * Required. Schedule recurring executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.RecurringScheduleOrBuilder + getRecurringScheduleOrBuilder() { + if (scheduleCase_ == 7) { + return (com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) schedule_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.getDefaultInstance(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+     * Output only. Time the patch deployment was created. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+     * Output only. Time the patch deployment was created. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+     * Output only. Time the patch deployment was created. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+     * Output only. Time the patch deployment was last updated. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time the patch deployment was last updated. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+     * Output only. Time the patch deployment was last updated. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LAST_EXECUTE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp lastExecuteTime_; + /** + * + * + *
+     * Output only. The last time a patch job was started by this deployment.
+     * Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastExecuteTime field is set. + */ + public boolean hasLastExecuteTime() { + return lastExecuteTime_ != null; + } + /** + * + * + *
+     * Output only. The last time a patch job was started by this deployment.
+     * Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecuteTime. + */ + public com.google.protobuf.Timestamp getLastExecuteTime() { + return lastExecuteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastExecuteTime_; + } + /** + * + * + *
+     * Output only. The last time a patch job was started by this deployment.
+     * Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastExecuteTimeOrBuilder() { + return getLastExecuteTime(); + } + + 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 (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (instanceFilter_ != null) { + output.writeMessage(3, getInstanceFilter()); + } + if (patchConfig_ != null) { + output.writeMessage(4, getPatchConfig()); + } + if (duration_ != null) { + output.writeMessage(5, getDuration()); + } + if (scheduleCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) schedule_); + } + if (scheduleCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) schedule_); + } + if (createTime_ != null) { + output.writeMessage(8, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(9, getUpdateTime()); + } + if (lastExecuteTime_ != null) { + output.writeMessage(10, getLastExecuteTime()); + } + 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 (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (instanceFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstanceFilter()); + } + if (patchConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPatchConfig()); + } + if (duration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDuration()); + } + if (scheduleCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) schedule_); + } + if (scheduleCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) schedule_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); + } + if (lastExecuteTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLastExecuteTime()); + } + 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.osconfig.v1.PatchDeployments.PatchDeployment)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment other = + (com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasInstanceFilter() != other.hasInstanceFilter()) return false; + if (hasInstanceFilter()) { + if (!getInstanceFilter().equals(other.getInstanceFilter())) return false; + } + if (hasPatchConfig() != other.hasPatchConfig()) return false; + if (hasPatchConfig()) { + if (!getPatchConfig().equals(other.getPatchConfig())) return false; + } + if (hasDuration() != other.hasDuration()) return false; + if (hasDuration()) { + if (!getDuration().equals(other.getDuration())) 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 (hasLastExecuteTime() != other.hasLastExecuteTime()) return false; + if (hasLastExecuteTime()) { + if (!getLastExecuteTime().equals(other.getLastExecuteTime())) return false; + } + if (!getScheduleCase().equals(other.getScheduleCase())) return false; + switch (scheduleCase_) { + case 6: + if (!getOneTimeSchedule().equals(other.getOneTimeSchedule())) return false; + break; + case 7: + if (!getRecurringSchedule().equals(other.getRecurringSchedule())) 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(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasInstanceFilter()) { + hash = (37 * hash) + INSTANCE_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getInstanceFilter().hashCode(); + } + if (hasPatchConfig()) { + hash = (37 * hash) + PATCH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPatchConfig().hashCode(); + } + if (hasDuration()) { + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration().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 (hasLastExecuteTime()) { + hash = (37 * hash) + LAST_EXECUTE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastExecuteTime().hashCode(); + } + switch (scheduleCase_) { + case 6: + hash = (37 * hash) + ONE_TIME_SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getOneTimeSchedule().hashCode(); + break; + case 7: + hash = (37 * hash) + RECURRING_SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getRecurringSchedule().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment 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.osconfig.v1.PatchDeployments.PatchDeployment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment 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.osconfig.v1.PatchDeployments.PatchDeployment parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment 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.osconfig.v1.PatchDeployments.PatchDeployment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment 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.osconfig.v1.PatchDeployments.PatchDeployment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment 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.osconfig.v1.PatchDeployments.PatchDeployment 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; + } + /** + * + * + *
+     * Patch deployments are configurations that individual patch jobs use to
+     * complete a patch. These configurations include instance filter, package
+     * repository settings, and a schedule. For more information about creating and
+     * managing patch deployments, see [Scheduling patch
+     * jobs](/compute/docs/os-patch-management/schedule-patch-jobs).
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchDeployment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.PatchDeployment) + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_PatchDeployment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_PatchDeployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.class, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.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_ = ""; + + description_ = ""; + + if (instanceFilterBuilder_ == null) { + instanceFilter_ = null; + } else { + instanceFilter_ = null; + instanceFilterBuilder_ = null; + } + if (patchConfigBuilder_ == null) { + patchConfig_ = null; + } else { + patchConfig_ = null; + patchConfigBuilder_ = null; + } + if (durationBuilder_ == null) { + duration_ = null; + } else { + duration_ = null; + durationBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (lastExecuteTimeBuilder_ == null) { + lastExecuteTime_ = null; + } else { + lastExecuteTime_ = null; + lastExecuteTimeBuilder_ = null; + } + scheduleCase_ = 0; + schedule_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_PatchDeployment_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment build() { + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment buildPartial() { + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment result = + new com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment(this); + result.name_ = name_; + result.description_ = description_; + if (instanceFilterBuilder_ == null) { + result.instanceFilter_ = instanceFilter_; + } else { + result.instanceFilter_ = instanceFilterBuilder_.build(); + } + if (patchConfigBuilder_ == null) { + result.patchConfig_ = patchConfig_; + } else { + result.patchConfig_ = patchConfigBuilder_.build(); + } + if (durationBuilder_ == null) { + result.duration_ = duration_; + } else { + result.duration_ = durationBuilder_.build(); + } + if (scheduleCase_ == 6) { + if (oneTimeScheduleBuilder_ == null) { + result.schedule_ = schedule_; + } else { + result.schedule_ = oneTimeScheduleBuilder_.build(); + } + } + if (scheduleCase_ == 7) { + if (recurringScheduleBuilder_ == null) { + result.schedule_ = schedule_; + } else { + result.schedule_ = recurringScheduleBuilder_.build(); + } + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (lastExecuteTimeBuilder_ == null) { + result.lastExecuteTime_ = lastExecuteTime_; + } else { + result.lastExecuteTime_ = lastExecuteTimeBuilder_.build(); + } + result.scheduleCase_ = scheduleCase_; + 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.osconfig.v1.PatchDeployments.PatchDeployment) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment other) { + if (other + == com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasInstanceFilter()) { + mergeInstanceFilter(other.getInstanceFilter()); + } + if (other.hasPatchConfig()) { + mergePatchConfig(other.getPatchConfig()); + } + if (other.hasDuration()) { + mergeDuration(other.getDuration()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasLastExecuteTime()) { + mergeLastExecuteTime(other.getLastExecuteTime()); + } + switch (other.getScheduleCase()) { + case ONE_TIME_SCHEDULE: + { + mergeOneTimeSchedule(other.getOneTimeSchedule()); + break; + } + case RECURRING_SCHEDULE: + { + mergeRecurringSchedule(other.getRecurringSchedule()); + break; + } + case SCHEDULE_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.osconfig.v1.PatchDeployments.PatchDeployment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int scheduleCase_ = 0; + private java.lang.Object schedule_; + + public ScheduleCase getScheduleCase() { + return ScheduleCase.forNumber(scheduleCase_); + } + + public Builder clearSchedule() { + scheduleCase_ = 0; + schedule_ = null; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Unique name for the patch deployment resource in a project. The patch
+       * deployment name is in the form:
+       * `projects/{project_id}/patchDeployments/{patch_deployment_id}`.
+       * This field is ignored when you create a new patch deployment.
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Unique name for the patch deployment resource in a project. The patch
+       * deployment name is in the form:
+       * `projects/{project_id}/patchDeployments/{patch_deployment_id}`.
+       * This field is ignored when you create a new patch deployment.
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Unique name for the patch deployment resource in a project. The patch
+       * deployment name is in the form:
+       * `projects/{project_id}/patchDeployments/{patch_deployment_id}`.
+       * This field is ignored when you create a new patch deployment.
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Unique name for the patch deployment resource in a project. The patch
+       * deployment name is in the form:
+       * `projects/{project_id}/patchDeployments/{patch_deployment_id}`.
+       * This field is ignored when you create a new patch deployment.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Unique name for the patch deployment resource in a project. The patch
+       * deployment name is in the form:
+       * `projects/{project_id}/patchDeployments/{patch_deployment_id}`.
+       * This field is ignored when you create a new patch deployment.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * Optional. Description of the patch deployment. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. Description of the patch deployment. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. Description of the patch deployment. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Description of the patch deployment. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Description of the patch deployment. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter instanceFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder> + instanceFilterBuilder_; + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instanceFilter field is set. + */ + public boolean hasInstanceFilter() { + return instanceFilterBuilder_ != null || instanceFilter_ != null; + } + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter getInstanceFilter() { + if (instanceFilterBuilder_ == null) { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } else { + return instanceFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter value) { + if (instanceFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceFilter_ = value; + onChanged(); + } else { + instanceFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder builderForValue) { + if (instanceFilterBuilder_ == null) { + instanceFilter_ = builderForValue.build(); + onChanged(); + } else { + instanceFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInstanceFilter( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter value) { + if (instanceFilterBuilder_ == null) { + if (instanceFilter_ != null) { + instanceFilter_ = + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.newBuilder( + instanceFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + instanceFilter_ = value; + } + onChanged(); + } else { + instanceFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstanceFilter() { + if (instanceFilterBuilder_ == null) { + instanceFilter_ = null; + onChanged(); + } else { + instanceFilter_ = null; + instanceFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder + getInstanceFilterBuilder() { + + onChanged(); + return getInstanceFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + if (instanceFilterBuilder_ != null) { + return instanceFilterBuilder_.getMessageOrBuilder(); + } else { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + } + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder> + getInstanceFilterFieldBuilder() { + if (instanceFilterBuilder_ == null) { + instanceFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder>( + getInstanceFilter(), getParentForChildren(), isClean()); + instanceFilter_ = null; + } + return instanceFilterBuilder_; + } + + private com.google.cloud.osconfig.v1.PatchJobs.PatchConfig patchConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder> + patchConfigBuilder_; + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the patchConfig field is set. + */ + public boolean hasPatchConfig() { + return patchConfigBuilder_ != null || patchConfig_ != null; + } + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The patchConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig getPatchConfig() { + if (patchConfigBuilder_ == null) { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } else { + return patchConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPatchConfig(com.google.cloud.osconfig.v1.PatchJobs.PatchConfig value) { + if (patchConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + patchConfig_ = value; + onChanged(); + } else { + patchConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPatchConfig( + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder builderForValue) { + if (patchConfigBuilder_ == null) { + patchConfig_ = builderForValue.build(); + onChanged(); + } else { + patchConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePatchConfig(com.google.cloud.osconfig.v1.PatchJobs.PatchConfig value) { + if (patchConfigBuilder_ == null) { + if (patchConfig_ != null) { + patchConfig_ = + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.newBuilder(patchConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + patchConfig_ = value; + } + onChanged(); + } else { + patchConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPatchConfig() { + if (patchConfigBuilder_ == null) { + patchConfig_ = null; + onChanged(); + } else { + patchConfig_ = null; + patchConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder getPatchConfigBuilder() { + + onChanged(); + return getPatchConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder getPatchConfigOrBuilder() { + if (patchConfigBuilder_ != null) { + return patchConfigBuilder_.getMessageOrBuilder(); + } else { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + } + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder> + getPatchConfigFieldBuilder() { + if (patchConfigBuilder_ == null) { + patchConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder>( + getPatchConfig(), getParentForChildren(), isClean()); + patchConfig_ = null; + } + return patchConfigBuilder_; + } + + private com.google.protobuf.Duration duration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + durationBuilder_; + /** + * + * + *
+       * Optional. Duration of the patch. After the duration ends, the patch times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the duration field is set. + */ + public boolean hasDuration() { + return durationBuilder_ != null || duration_ != null; + } + /** + * + * + *
+       * Optional. Duration of the patch. After the duration ends, the patch times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The duration. + */ + public com.google.protobuf.Duration getDuration() { + if (durationBuilder_ == null) { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } else { + return durationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Duration of the patch. After the duration ends, the patch times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + duration_ = value; + onChanged(); + } else { + durationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Duration of the patch. After the duration ends, the patch times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (durationBuilder_ == null) { + duration_ = builderForValue.build(); + onChanged(); + } else { + durationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. Duration of the patch. After the duration ends, the patch times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (duration_ != null) { + duration_ = + com.google.protobuf.Duration.newBuilder(duration_).mergeFrom(value).buildPartial(); + } else { + duration_ = value; + } + onChanged(); + } else { + durationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Duration of the patch. After the duration ends, the patch times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDuration() { + if (durationBuilder_ == null) { + duration_ = null; + onChanged(); + } else { + duration_ = null; + durationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. Duration of the patch. After the duration ends, the patch times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getDurationBuilder() { + + onChanged(); + return getDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Duration of the patch. After the duration ends, the patch times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + if (durationBuilder_ != null) { + return durationBuilder_.getMessageOrBuilder(); + } else { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + } + /** + * + * + *
+       * Optional. Duration of the patch. After the duration ends, the patch times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDurationFieldBuilder() { + if (durationBuilder_ == null) { + durationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDuration(), getParentForChildren(), isClean()); + duration_ = null; + } + return durationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule, + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeScheduleOrBuilder> + oneTimeScheduleBuilder_; + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the oneTimeSchedule field is set. + */ + public boolean hasOneTimeSchedule() { + return scheduleCase_ == 6; + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oneTimeSchedule. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule getOneTimeSchedule() { + if (oneTimeScheduleBuilder_ == null) { + if (scheduleCase_ == 6) { + return (com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) schedule_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.getDefaultInstance(); + } else { + if (scheduleCase_ == 6) { + return oneTimeScheduleBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOneTimeSchedule( + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule value) { + if (oneTimeScheduleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schedule_ = value; + onChanged(); + } else { + oneTimeScheduleBuilder_.setMessage(value); + } + scheduleCase_ = 6; + return this; + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOneTimeSchedule( + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.Builder builderForValue) { + if (oneTimeScheduleBuilder_ == null) { + schedule_ = builderForValue.build(); + onChanged(); + } else { + oneTimeScheduleBuilder_.setMessage(builderForValue.build()); + } + scheduleCase_ = 6; + return this; + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOneTimeSchedule( + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule value) { + if (oneTimeScheduleBuilder_ == null) { + if (scheduleCase_ == 6 + && schedule_ + != com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule + .getDefaultInstance()) { + schedule_ = + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.newBuilder( + (com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) schedule_) + .mergeFrom(value) + .buildPartial(); + } else { + schedule_ = value; + } + onChanged(); + } else { + if (scheduleCase_ == 6) { + oneTimeScheduleBuilder_.mergeFrom(value); + } + oneTimeScheduleBuilder_.setMessage(value); + } + scheduleCase_ = 6; + return this; + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOneTimeSchedule() { + if (oneTimeScheduleBuilder_ == null) { + if (scheduleCase_ == 6) { + scheduleCase_ = 0; + schedule_ = null; + onChanged(); + } + } else { + if (scheduleCase_ == 6) { + scheduleCase_ = 0; + schedule_ = null; + } + oneTimeScheduleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.Builder + getOneTimeScheduleBuilder() { + return getOneTimeScheduleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.OneTimeScheduleOrBuilder + getOneTimeScheduleOrBuilder() { + if ((scheduleCase_ == 6) && (oneTimeScheduleBuilder_ != null)) { + return oneTimeScheduleBuilder_.getMessageOrBuilder(); + } else { + if (scheduleCase_ == 6) { + return (com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) schedule_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule, + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeScheduleOrBuilder> + getOneTimeScheduleFieldBuilder() { + if (oneTimeScheduleBuilder_ == null) { + if (!(scheduleCase_ == 6)) { + schedule_ = + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.getDefaultInstance(); + } + oneTimeScheduleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule, + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeScheduleOrBuilder>( + (com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) schedule_, + getParentForChildren(), + isClean()); + schedule_ = null; + } + scheduleCase_ = 6; + onChanged(); + ; + return oneTimeScheduleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule, + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.RecurringScheduleOrBuilder> + recurringScheduleBuilder_; + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the recurringSchedule field is set. + */ + public boolean hasRecurringSchedule() { + return scheduleCase_ == 7; + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurringSchedule. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule + getRecurringSchedule() { + if (recurringScheduleBuilder_ == null) { + if (scheduleCase_ == 7) { + return (com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) schedule_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule + .getDefaultInstance(); + } else { + if (scheduleCase_ == 7) { + return recurringScheduleBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRecurringSchedule( + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule value) { + if (recurringScheduleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schedule_ = value; + onChanged(); + } else { + recurringScheduleBuilder_.setMessage(value); + } + scheduleCase_ = 7; + return this; + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRecurringSchedule( + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Builder builderForValue) { + if (recurringScheduleBuilder_ == null) { + schedule_ = builderForValue.build(); + onChanged(); + } else { + recurringScheduleBuilder_.setMessage(builderForValue.build()); + } + scheduleCase_ = 7; + return this; + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRecurringSchedule( + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule value) { + if (recurringScheduleBuilder_ == null) { + if (scheduleCase_ == 7 + && schedule_ + != com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule + .getDefaultInstance()) { + schedule_ = + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.newBuilder( + (com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) schedule_) + .mergeFrom(value) + .buildPartial(); + } else { + schedule_ = value; + } + onChanged(); + } else { + if (scheduleCase_ == 7) { + recurringScheduleBuilder_.mergeFrom(value); + } + recurringScheduleBuilder_.setMessage(value); + } + scheduleCase_ = 7; + return this; + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRecurringSchedule() { + if (recurringScheduleBuilder_ == null) { + if (scheduleCase_ == 7) { + scheduleCase_ = 0; + schedule_ = null; + onChanged(); + } + } else { + if (scheduleCase_ == 7) { + scheduleCase_ = 0; + schedule_ = null; + } + recurringScheduleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Builder + getRecurringScheduleBuilder() { + return getRecurringScheduleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.RecurringScheduleOrBuilder + getRecurringScheduleOrBuilder() { + if ((scheduleCase_ == 7) && (recurringScheduleBuilder_ != null)) { + return recurringScheduleBuilder_.getMessageOrBuilder(); + } else { + if (scheduleCase_ == 7) { + return (com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) schedule_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule, + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.RecurringScheduleOrBuilder> + getRecurringScheduleFieldBuilder() { + if (recurringScheduleBuilder_ == null) { + if (!(scheduleCase_ == 7)) { + schedule_ = + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule + .getDefaultInstance(); + } + recurringScheduleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule, + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.RecurringScheduleOrBuilder>( + (com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) schedule_, + getParentForChildren(), + isClean()); + schedule_ = null; + } + scheduleCase_ = 7; + onChanged(); + ; + return recurringScheduleBuilder_; + } + + 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. Time the patch deployment was created. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+       * Output only. Time the patch deployment was created. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.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. Time the patch deployment was created. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.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. Time the patch deployment was created. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.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. Time the patch deployment was created. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.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. Time the patch deployment was created. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Output only. Time the patch deployment was created. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. Time the patch deployment was created. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.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. Time the patch deployment was created. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp create_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> + 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. Time the patch deployment was last updated. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+       * Output only. Time the patch deployment was last updated. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.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. Time the patch deployment was last updated. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.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. Time the patch deployment was last updated. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.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. Time the patch deployment was last updated. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.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. Time the patch deployment was last updated. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Output only. Time the patch deployment was last updated. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. Time the patch deployment was last updated. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.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. Time the patch deployment was last updated. Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp update_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> + 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 lastExecuteTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastExecuteTimeBuilder_; + /** + * + * + *
+       * Output only. The last time a patch job was started by this deployment.
+       * Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastExecuteTime field is set. + */ + public boolean hasLastExecuteTime() { + return lastExecuteTimeBuilder_ != null || lastExecuteTime_ != null; + } + /** + * + * + *
+       * Output only. The last time a patch job was started by this deployment.
+       * Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecuteTime. + */ + public com.google.protobuf.Timestamp getLastExecuteTime() { + if (lastExecuteTimeBuilder_ == null) { + return lastExecuteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastExecuteTime_; + } else { + return lastExecuteTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. The last time a patch job was started by this deployment.
+       * Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastExecuteTime(com.google.protobuf.Timestamp value) { + if (lastExecuteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastExecuteTime_ = value; + onChanged(); + } else { + lastExecuteTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The last time a patch job was started by this deployment.
+       * Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastExecuteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastExecuteTimeBuilder_ == null) { + lastExecuteTime_ = builderForValue.build(); + onChanged(); + } else { + lastExecuteTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Output only. The last time a patch job was started by this deployment.
+       * Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastExecuteTime(com.google.protobuf.Timestamp value) { + if (lastExecuteTimeBuilder_ == null) { + if (lastExecuteTime_ != null) { + lastExecuteTime_ = + com.google.protobuf.Timestamp.newBuilder(lastExecuteTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastExecuteTime_ = value; + } + onChanged(); + } else { + lastExecuteTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The last time a patch job was started by this deployment.
+       * Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastExecuteTime() { + if (lastExecuteTimeBuilder_ == null) { + lastExecuteTime_ = null; + onChanged(); + } else { + lastExecuteTime_ = null; + lastExecuteTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Output only. The last time a patch job was started by this deployment.
+       * Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastExecuteTimeBuilder() { + + onChanged(); + return getLastExecuteTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. The last time a patch job was started by this deployment.
+       * Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastExecuteTimeOrBuilder() { + if (lastExecuteTimeBuilder_ != null) { + return lastExecuteTimeBuilder_.getMessageOrBuilder(); + } else { + return lastExecuteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastExecuteTime_; + } + } + /** + * + * + *
+       * Output only. The last time a patch job was started by this deployment.
+       * Timestamp is in
+       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+       * text format.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_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> + getLastExecuteTimeFieldBuilder() { + if (lastExecuteTimeBuilder_ == null) { + lastExecuteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastExecuteTime(), getParentForChildren(), isClean()); + lastExecuteTime_ = null; + } + return lastExecuteTimeBuilder_; + } + + @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.osconfig.v1.PatchDeployment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.PatchDeployment) + private static final com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment(); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PatchDeployment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PatchDeployment(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.osconfig.v1.PatchDeployments.PatchDeployment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OneTimeScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.OneTimeSchedule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The desired patch job execution time.
+     * 
+ * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the executeTime field is set. + */ + boolean hasExecuteTime(); + /** + * + * + *
+     * Required. The desired patch job execution time.
+     * 
+ * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The executeTime. + */ + com.google.protobuf.Timestamp getExecuteTime(); + /** + * + * + *
+     * Required. The desired patch job execution time.
+     * 
+ * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getExecuteTimeOrBuilder(); + } + /** + * + * + *
+   * Sets the time for a one time patch deployment. Timestamp is in
+   * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+   * text format.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.OneTimeSchedule} + */ + public static final class OneTimeSchedule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.OneTimeSchedule) + OneTimeScheduleOrBuilder { + private static final long serialVersionUID = 0L; + // Use OneTimeSchedule.newBuilder() to construct. + private OneTimeSchedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OneTimeSchedule() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OneTimeSchedule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OneTimeSchedule( + 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 (executeTime_ != null) { + subBuilder = executeTime_.toBuilder(); + } + executeTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(executeTime_); + executeTime_ = 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.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_OneTimeSchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_OneTimeSchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.class, + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.Builder.class); + } + + public static final int EXECUTE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp executeTime_; + /** + * + * + *
+     * Required. The desired patch job execution time.
+     * 
+ * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the executeTime field is set. + */ + public boolean hasExecuteTime() { + return executeTime_ != null; + } + /** + * + * + *
+     * Required. The desired patch job execution time.
+     * 
+ * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The executeTime. + */ + public com.google.protobuf.Timestamp getExecuteTime() { + return executeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : executeTime_; + } + /** + * + * + *
+     * Required. The desired patch job execution time.
+     * 
+ * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExecuteTimeOrBuilder() { + return getExecuteTime(); + } + + 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 (executeTime_ != null) { + output.writeMessage(1, getExecuteTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (executeTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExecuteTime()); + } + 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.osconfig.v1.PatchDeployments.OneTimeSchedule)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule other = + (com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) obj; + + if (hasExecuteTime() != other.hasExecuteTime()) return false; + if (hasExecuteTime()) { + if (!getExecuteTime().equals(other.getExecuteTime())) 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 (hasExecuteTime()) { + hash = (37 * hash) + EXECUTE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExecuteTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule 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.osconfig.v1.PatchDeployments.OneTimeSchedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule 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.osconfig.v1.PatchDeployments.OneTimeSchedule parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule 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.osconfig.v1.PatchDeployments.OneTimeSchedule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule 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.osconfig.v1.PatchDeployments.OneTimeSchedule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule 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.osconfig.v1.PatchDeployments.OneTimeSchedule 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; + } + /** + * + * + *
+     * Sets the time for a one time patch deployment. Timestamp is in
+     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+     * text format.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.OneTimeSchedule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.OneTimeSchedule) + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_OneTimeSchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_OneTimeSchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.class, + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.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 (executeTimeBuilder_ == null) { + executeTime_ = null; + } else { + executeTime_ = null; + executeTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_OneTimeSchedule_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule build() { + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule buildPartial() { + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule result = + new com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule(this); + if (executeTimeBuilder_ == null) { + result.executeTime_ = executeTime_; + } else { + result.executeTime_ = executeTimeBuilder_.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.osconfig.v1.PatchDeployments.OneTimeSchedule) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule other) { + if (other + == com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule.getDefaultInstance()) + return this; + if (other.hasExecuteTime()) { + mergeExecuteTime(other.getExecuteTime()); + } + 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.osconfig.v1.PatchDeployments.OneTimeSchedule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp executeTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + executeTimeBuilder_; + /** + * + * + *
+       * Required. The desired patch job execution time.
+       * 
+ * + * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the executeTime field is set. + */ + public boolean hasExecuteTime() { + return executeTimeBuilder_ != null || executeTime_ != null; + } + /** + * + * + *
+       * Required. The desired patch job execution time.
+       * 
+ * + * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The executeTime. + */ + public com.google.protobuf.Timestamp getExecuteTime() { + if (executeTimeBuilder_ == null) { + return executeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : executeTime_; + } else { + return executeTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The desired patch job execution time.
+       * 
+ * + * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExecuteTime(com.google.protobuf.Timestamp value) { + if (executeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executeTime_ = value; + onChanged(); + } else { + executeTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. The desired patch job execution time.
+       * 
+ * + * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExecuteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (executeTimeBuilder_ == null) { + executeTime_ = builderForValue.build(); + onChanged(); + } else { + executeTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. The desired patch job execution time.
+       * 
+ * + * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExecuteTime(com.google.protobuf.Timestamp value) { + if (executeTimeBuilder_ == null) { + if (executeTime_ != null) { + executeTime_ = + com.google.protobuf.Timestamp.newBuilder(executeTime_) + .mergeFrom(value) + .buildPartial(); + } else { + executeTime_ = value; + } + onChanged(); + } else { + executeTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. The desired patch job execution time.
+       * 
+ * + * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExecuteTime() { + if (executeTimeBuilder_ == null) { + executeTime_ = null; + onChanged(); + } else { + executeTime_ = null; + executeTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. The desired patch job execution time.
+       * 
+ * + * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getExecuteTimeBuilder() { + + onChanged(); + return getExecuteTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The desired patch job execution time.
+       * 
+ * + * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExecuteTimeOrBuilder() { + if (executeTimeBuilder_ != null) { + return executeTimeBuilder_.getMessageOrBuilder(); + } else { + return executeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : executeTime_; + } + } + /** + * + * + *
+       * Required. The desired patch job execution time.
+       * 
+ * + * + * .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExecuteTimeFieldBuilder() { + if (executeTimeBuilder_ == null) { + executeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExecuteTime(), getParentForChildren(), isClean()); + executeTime_ = null; + } + return executeTimeBuilder_; + } + + @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.osconfig.v1.OneTimeSchedule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.OneTimeSchedule) + private static final com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule(); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.OneTimeSchedule + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OneTimeSchedule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OneTimeSchedule(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.osconfig.v1.PatchDeployments.OneTimeSchedule + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RecurringScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.RecurringSchedule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Defines the time zone that `time_of_day` is relative to.
+     * The rules for daylight saving time are determined by the chosen time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the timeZone field is set. + */ + boolean hasTimeZone(); + /** + * + * + *
+     * Required. Defines the time zone that `time_of_day` is relative to.
+     * The rules for daylight saving time are determined by the chosen time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + com.google.type.TimeZone getTimeZone(); + /** + * + * + *
+     * Required. Defines the time zone that `time_of_day` is relative to.
+     * The rules for daylight saving time are determined by the chosen time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder(); + + /** + * + * + *
+     * Optional. The time that the recurring schedule becomes effective.
+     * Defaults to `create_time` of the patch deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+     * Optional. The time that the recurring schedule becomes effective.
+     * Defaults to `create_time` of the patch deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+     * Optional. The time that the recurring schedule becomes effective.
+     * Defaults to `create_time` of the patch deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+     * Optional. The end time at which a recurring patch deployment schedule is no longer
+     * active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+     * Optional. The end time at which a recurring patch deployment schedule is no longer
+     * active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+     * Optional. The end time at which a recurring patch deployment schedule is no longer
+     * active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+     * Required. Time of the day to run a recurring deployment.
+     * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the timeOfDay field is set. + */ + boolean hasTimeOfDay(); + /** + * + * + *
+     * Required. Time of the day to run a recurring deployment.
+     * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The timeOfDay. + */ + com.google.type.TimeOfDay getTimeOfDay(); + /** + * + * + *
+     * Required. Time of the day to run a recurring deployment.
+     * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.type.TimeOfDayOrBuilder getTimeOfDayOrBuilder(); + + /** + * + * + *
+     * Required. The frequency unit of this recurring schedule.
+     * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for frequency. + */ + int getFrequencyValue(); + /** + * + * + *
+     * Required. The frequency unit of this recurring schedule.
+     * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The frequency. + */ + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency getFrequency(); + + /** + * + * + *
+     * Required. Schedule with weekly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the weekly field is set. + */ + boolean hasWeekly(); + /** + * + * + *
+     * Required. Schedule with weekly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekly. + */ + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule getWeekly(); + /** + * + * + *
+     * Required. Schedule with weekly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1.PatchDeployments.WeeklyScheduleOrBuilder getWeeklyOrBuilder(); + + /** + * + * + *
+     * Required. Schedule with monthly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the monthly field is set. + */ + boolean hasMonthly(); + /** + * + * + *
+     * Required. Schedule with monthly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The monthly. + */ + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule getMonthly(); + /** + * + * + *
+     * Required. Schedule with monthly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1.PatchDeployments.MonthlyScheduleOrBuilder getMonthlyOrBuilder(); + + /** + * + * + *
+     * Output only. The time the last patch job ran successfully.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastExecuteTime field is set. + */ + boolean hasLastExecuteTime(); + /** + * + * + *
+     * Output only. The time the last patch job ran successfully.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecuteTime. + */ + com.google.protobuf.Timestamp getLastExecuteTime(); + /** + * + * + *
+     * Output only. The time the last patch job ran successfully.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastExecuteTimeOrBuilder(); + + /** + * + * + *
+     * Output only. The time the next patch job is scheduled to run.
+     * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the nextExecuteTime field is set. + */ + boolean hasNextExecuteTime(); + /** + * + * + *
+     * Output only. The time the next patch job is scheduled to run.
+     * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The nextExecuteTime. + */ + com.google.protobuf.Timestamp getNextExecuteTime(); + /** + * + * + *
+     * Output only. The time the next patch job is scheduled to run.
+     * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getNextExecuteTimeOrBuilder(); + + public com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.ScheduleConfigCase + getScheduleConfigCase(); + } + /** + * + * + *
+   * Sets the time for recurring patch deployments.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.RecurringSchedule} + */ + public static final class RecurringSchedule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.RecurringSchedule) + RecurringScheduleOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecurringSchedule.newBuilder() to construct. + private RecurringSchedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RecurringSchedule() { + frequency_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RecurringSchedule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RecurringSchedule( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.type.TimeZone.Builder subBuilder = null; + if (timeZone_ != null) { + subBuilder = timeZone_.toBuilder(); + } + timeZone_ = input.readMessage(com.google.type.TimeZone.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeZone_); + timeZone_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.type.TimeOfDay.Builder subBuilder = null; + if (timeOfDay_ != null) { + subBuilder = timeOfDay_.toBuilder(); + } + timeOfDay_ = + input.readMessage(com.google.type.TimeOfDay.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeOfDay_); + timeOfDay_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + int rawValue = input.readEnum(); + + frequency_ = rawValue; + break; + } + case 50: + { + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.Builder subBuilder = + null; + if (scheduleConfigCase_ == 6) { + subBuilder = + ((com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) + scheduleConfig_) + .toBuilder(); + } + scheduleConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) + scheduleConfig_); + scheduleConfig_ = subBuilder.buildPartial(); + } + scheduleConfigCase_ = 6; + break; + } + case 58: + { + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.Builder subBuilder = + null; + if (scheduleConfigCase_ == 7) { + subBuilder = + ((com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) + scheduleConfig_) + .toBuilder(); + } + scheduleConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) + scheduleConfig_); + scheduleConfig_ = subBuilder.buildPartial(); + } + scheduleConfigCase_ = 7; + break; + } + case 74: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastExecuteTime_ != null) { + subBuilder = lastExecuteTime_.toBuilder(); + } + lastExecuteTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastExecuteTime_); + lastExecuteTime_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (nextExecuteTime_ != null) { + subBuilder = nextExecuteTime_.toBuilder(); + } + nextExecuteTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(nextExecuteTime_); + nextExecuteTime_ = 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.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_RecurringSchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_RecurringSchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.class, + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Builder.class); + } + + /** + * + * + *
+     * Specifies the frequency of the recurring patch deployments.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1.RecurringSchedule.Frequency} + */ + public enum Frequency implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Invalid. A frequency must be specified.
+       * 
+ * + * FREQUENCY_UNSPECIFIED = 0; + */ + FREQUENCY_UNSPECIFIED(0), + /** + * + * + *
+       * Indicates that the frequency should be expressed in terms of
+       * weeks.
+       * 
+ * + * WEEKLY = 1; + */ + WEEKLY(1), + /** + * + * + *
+       * Indicates that the frequency should be expressed in terms of
+       * months.
+       * 
+ * + * MONTHLY = 2; + */ + MONTHLY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Invalid. A frequency must be specified.
+       * 
+ * + * FREQUENCY_UNSPECIFIED = 0; + */ + public static final int FREQUENCY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Indicates that the frequency should be expressed in terms of
+       * weeks.
+       * 
+ * + * WEEKLY = 1; + */ + public static final int WEEKLY_VALUE = 1; + /** + * + * + *
+       * Indicates that the frequency should be expressed in terms of
+       * months.
+       * 
+ * + * MONTHLY = 2; + */ + public static final int MONTHLY_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 Frequency 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 Frequency forNumber(int value) { + switch (value) { + case 0: + return FREQUENCY_UNSPECIFIED; + case 1: + return WEEKLY; + case 2: + return MONTHLY; + 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 Frequency findValueByNumber(int number) { + return Frequency.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.osconfig.v1.PatchDeployments.RecurringSchedule.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Frequency[] VALUES = values(); + + public static Frequency 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 Frequency(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1.RecurringSchedule.Frequency) + } + + private int scheduleConfigCase_ = 0; + private java.lang.Object scheduleConfig_; + + public enum ScheduleConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + WEEKLY(6), + MONTHLY(7), + SCHEDULECONFIG_NOT_SET(0); + private final int value; + + private ScheduleConfigCase(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 ScheduleConfigCase valueOf(int value) { + return forNumber(value); + } + + public static ScheduleConfigCase forNumber(int value) { + switch (value) { + case 6: + return WEEKLY; + case 7: + return MONTHLY; + case 0: + return SCHEDULECONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ScheduleConfigCase getScheduleConfigCase() { + return ScheduleConfigCase.forNumber(scheduleConfigCase_); + } + + public static final int TIME_ZONE_FIELD_NUMBER = 1; + private com.google.type.TimeZone timeZone_; + /** + * + * + *
+     * Required. Defines the time zone that `time_of_day` is relative to.
+     * The rules for daylight saving time are determined by the chosen time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the timeZone field is set. + */ + public boolean hasTimeZone() { + return timeZone_ != null; + } + /** + * + * + *
+     * Required. Defines the time zone that `time_of_day` is relative to.
+     * The rules for daylight saving time are determined by the chosen time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + public com.google.type.TimeZone getTimeZone() { + return timeZone_ == null ? com.google.type.TimeZone.getDefaultInstance() : timeZone_; + } + /** + * + * + *
+     * Required. Defines the time zone that `time_of_day` is relative to.
+     * The rules for daylight saving time are determined by the chosen time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder() { + return getTimeZone(); + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+     * Optional. The time that the recurring schedule becomes effective.
+     * Defaults to `create_time` of the patch deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+     * Optional. The time that the recurring schedule becomes effective.
+     * Defaults to `create_time` of the patch deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+     * Optional. The time that the recurring schedule becomes effective.
+     * Defaults to `create_time` of the patch deployment.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+     * Optional. The end time at which a recurring patch deployment schedule is no longer
+     * active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+     * Optional. The end time at which a recurring patch deployment schedule is no longer
+     * active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+     * Optional. The end time at which a recurring patch deployment schedule is no longer
+     * active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TIME_OF_DAY_FIELD_NUMBER = 4; + private com.google.type.TimeOfDay timeOfDay_; + /** + * + * + *
+     * Required. Time of the day to run a recurring deployment.
+     * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the timeOfDay field is set. + */ + public boolean hasTimeOfDay() { + return timeOfDay_ != null; + } + /** + * + * + *
+     * Required. Time of the day to run a recurring deployment.
+     * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The timeOfDay. + */ + public com.google.type.TimeOfDay getTimeOfDay() { + return timeOfDay_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : timeOfDay_; + } + /** + * + * + *
+     * Required. Time of the day to run a recurring deployment.
+     * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.type.TimeOfDayOrBuilder getTimeOfDayOrBuilder() { + return getTimeOfDay(); + } + + public static final int FREQUENCY_FIELD_NUMBER = 5; + private int frequency_; + /** + * + * + *
+     * Required. The frequency unit of this recurring schedule.
+     * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for frequency. + */ + public int getFrequencyValue() { + return frequency_; + } + /** + * + * + *
+     * Required. The frequency unit of this recurring schedule.
+     * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The frequency. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency + getFrequency() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency result = + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency.valueOf( + frequency_); + return result == null + ? com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency.UNRECOGNIZED + : result; + } + + public static final int WEEKLY_FIELD_NUMBER = 6; + /** + * + * + *
+     * Required. Schedule with weekly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the weekly field is set. + */ + public boolean hasWeekly() { + return scheduleConfigCase_ == 6; + } + /** + * + * + *
+     * Required. Schedule with weekly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekly. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule getWeekly() { + if (scheduleConfigCase_ == 6) { + return (com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.getDefaultInstance(); + } + /** + * + * + *
+     * Required. Schedule with weekly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.WeeklyScheduleOrBuilder + getWeeklyOrBuilder() { + if (scheduleConfigCase_ == 6) { + return (com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.getDefaultInstance(); + } + + public static final int MONTHLY_FIELD_NUMBER = 7; + /** + * + * + *
+     * Required. Schedule with monthly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the monthly field is set. + */ + public boolean hasMonthly() { + return scheduleConfigCase_ == 7; + } + /** + * + * + *
+     * Required. Schedule with monthly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The monthly. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule getMonthly() { + if (scheduleConfigCase_ == 7) { + return (com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.getDefaultInstance(); + } + /** + * + * + *
+     * Required. Schedule with monthly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.MonthlyScheduleOrBuilder + getMonthlyOrBuilder() { + if (scheduleConfigCase_ == 7) { + return (com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.getDefaultInstance(); + } + + public static final int LAST_EXECUTE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp lastExecuteTime_; + /** + * + * + *
+     * Output only. The time the last patch job ran successfully.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastExecuteTime field is set. + */ + public boolean hasLastExecuteTime() { + return lastExecuteTime_ != null; + } + /** + * + * + *
+     * Output only. The time the last patch job ran successfully.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecuteTime. + */ + public com.google.protobuf.Timestamp getLastExecuteTime() { + return lastExecuteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastExecuteTime_; + } + /** + * + * + *
+     * Output only. The time the last patch job ran successfully.
+     * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastExecuteTimeOrBuilder() { + return getLastExecuteTime(); + } + + public static final int NEXT_EXECUTE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp nextExecuteTime_; + /** + * + * + *
+     * Output only. The time the next patch job is scheduled to run.
+     * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the nextExecuteTime field is set. + */ + public boolean hasNextExecuteTime() { + return nextExecuteTime_ != null; + } + /** + * + * + *
+     * Output only. The time the next patch job is scheduled to run.
+     * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The nextExecuteTime. + */ + public com.google.protobuf.Timestamp getNextExecuteTime() { + return nextExecuteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : nextExecuteTime_; + } + /** + * + * + *
+     * Output only. The time the next patch job is scheduled to run.
+     * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getNextExecuteTimeOrBuilder() { + return getNextExecuteTime(); + } + + 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 (timeZone_ != null) { + output.writeMessage(1, getTimeZone()); + } + if (startTime_ != null) { + output.writeMessage(2, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(3, getEndTime()); + } + if (timeOfDay_ != null) { + output.writeMessage(4, getTimeOfDay()); + } + if (frequency_ + != com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency + .FREQUENCY_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, frequency_); + } + if (scheduleConfigCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) scheduleConfig_); + } + if (scheduleConfigCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) scheduleConfig_); + } + if (lastExecuteTime_ != null) { + output.writeMessage(9, getLastExecuteTime()); + } + if (nextExecuteTime_ != null) { + output.writeMessage(10, getNextExecuteTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timeZone_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimeZone()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + if (timeOfDay_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTimeOfDay()); + } + if (frequency_ + != com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency + .FREQUENCY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, frequency_); + } + if (scheduleConfigCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) scheduleConfig_); + } + if (scheduleConfigCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) scheduleConfig_); + } + if (lastExecuteTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getLastExecuteTime()); + } + if (nextExecuteTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getNextExecuteTime()); + } + 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.osconfig.v1.PatchDeployments.RecurringSchedule)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule other = + (com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) obj; + + if (hasTimeZone() != other.hasTimeZone()) return false; + if (hasTimeZone()) { + if (!getTimeZone().equals(other.getTimeZone())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasTimeOfDay() != other.hasTimeOfDay()) return false; + if (hasTimeOfDay()) { + if (!getTimeOfDay().equals(other.getTimeOfDay())) return false; + } + if (frequency_ != other.frequency_) return false; + if (hasLastExecuteTime() != other.hasLastExecuteTime()) return false; + if (hasLastExecuteTime()) { + if (!getLastExecuteTime().equals(other.getLastExecuteTime())) return false; + } + if (hasNextExecuteTime() != other.hasNextExecuteTime()) return false; + if (hasNextExecuteTime()) { + if (!getNextExecuteTime().equals(other.getNextExecuteTime())) return false; + } + if (!getScheduleConfigCase().equals(other.getScheduleConfigCase())) return false; + switch (scheduleConfigCase_) { + case 6: + if (!getWeekly().equals(other.getWeekly())) return false; + break; + case 7: + if (!getMonthly().equals(other.getMonthly())) 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 (hasTimeZone()) { + hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasTimeOfDay()) { + hash = (37 * hash) + TIME_OF_DAY_FIELD_NUMBER; + hash = (53 * hash) + getTimeOfDay().hashCode(); + } + hash = (37 * hash) + FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + frequency_; + if (hasLastExecuteTime()) { + hash = (37 * hash) + LAST_EXECUTE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastExecuteTime().hashCode(); + } + if (hasNextExecuteTime()) { + hash = (37 * hash) + NEXT_EXECUTE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getNextExecuteTime().hashCode(); + } + switch (scheduleConfigCase_) { + case 6: + hash = (37 * hash) + WEEKLY_FIELD_NUMBER; + hash = (53 * hash) + getWeekly().hashCode(); + break; + case 7: + hash = (37 * hash) + MONTHLY_FIELD_NUMBER; + hash = (53 * hash) + getMonthly().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule 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.osconfig.v1.PatchDeployments.RecurringSchedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule 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.osconfig.v1.PatchDeployments.RecurringSchedule parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule 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.osconfig.v1.PatchDeployments.RecurringSchedule + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule + 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.osconfig.v1.PatchDeployments.RecurringSchedule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule 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.osconfig.v1.PatchDeployments.RecurringSchedule 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; + } + /** + * + * + *
+     * Sets the time for recurring patch deployments.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.RecurringSchedule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.RecurringSchedule) + com.google.cloud.osconfig.v1.PatchDeployments.RecurringScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_RecurringSchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_RecurringSchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.class, + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.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 (timeZoneBuilder_ == null) { + timeZone_ = null; + } else { + timeZone_ = null; + timeZoneBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (timeOfDayBuilder_ == null) { + timeOfDay_ = null; + } else { + timeOfDay_ = null; + timeOfDayBuilder_ = null; + } + frequency_ = 0; + + if (lastExecuteTimeBuilder_ == null) { + lastExecuteTime_ = null; + } else { + lastExecuteTime_ = null; + lastExecuteTimeBuilder_ = null; + } + if (nextExecuteTimeBuilder_ == null) { + nextExecuteTime_ = null; + } else { + nextExecuteTime_ = null; + nextExecuteTimeBuilder_ = null; + } + scheduleConfigCase_ = 0; + scheduleConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_RecurringSchedule_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule build() { + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule buildPartial() { + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule result = + new com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule(this); + if (timeZoneBuilder_ == null) { + result.timeZone_ = timeZone_; + } else { + result.timeZone_ = timeZoneBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (timeOfDayBuilder_ == null) { + result.timeOfDay_ = timeOfDay_; + } else { + result.timeOfDay_ = timeOfDayBuilder_.build(); + } + result.frequency_ = frequency_; + if (scheduleConfigCase_ == 6) { + if (weeklyBuilder_ == null) { + result.scheduleConfig_ = scheduleConfig_; + } else { + result.scheduleConfig_ = weeklyBuilder_.build(); + } + } + if (scheduleConfigCase_ == 7) { + if (monthlyBuilder_ == null) { + result.scheduleConfig_ = scheduleConfig_; + } else { + result.scheduleConfig_ = monthlyBuilder_.build(); + } + } + if (lastExecuteTimeBuilder_ == null) { + result.lastExecuteTime_ = lastExecuteTime_; + } else { + result.lastExecuteTime_ = lastExecuteTimeBuilder_.build(); + } + if (nextExecuteTimeBuilder_ == null) { + result.nextExecuteTime_ = nextExecuteTime_; + } else { + result.nextExecuteTime_ = nextExecuteTimeBuilder_.build(); + } + result.scheduleConfigCase_ = scheduleConfigCase_; + 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.osconfig.v1.PatchDeployments.RecurringSchedule) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule other) { + if (other + == com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.getDefaultInstance()) + return this; + if (other.hasTimeZone()) { + mergeTimeZone(other.getTimeZone()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasTimeOfDay()) { + mergeTimeOfDay(other.getTimeOfDay()); + } + if (other.frequency_ != 0) { + setFrequencyValue(other.getFrequencyValue()); + } + if (other.hasLastExecuteTime()) { + mergeLastExecuteTime(other.getLastExecuteTime()); + } + if (other.hasNextExecuteTime()) { + mergeNextExecuteTime(other.getNextExecuteTime()); + } + switch (other.getScheduleConfigCase()) { + case WEEKLY: + { + mergeWeekly(other.getWeekly()); + break; + } + case MONTHLY: + { + mergeMonthly(other.getMonthly()); + break; + } + case SCHEDULECONFIG_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.osconfig.v1.PatchDeployments.RecurringSchedule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int scheduleConfigCase_ = 0; + private java.lang.Object scheduleConfig_; + + public ScheduleConfigCase getScheduleConfigCase() { + return ScheduleConfigCase.forNumber(scheduleConfigCase_); + } + + public Builder clearScheduleConfig() { + scheduleConfigCase_ = 0; + scheduleConfig_ = null; + onChanged(); + return this; + } + + private com.google.type.TimeZone timeZone_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeZone, + com.google.type.TimeZone.Builder, + com.google.type.TimeZoneOrBuilder> + timeZoneBuilder_; + /** + * + * + *
+       * Required. Defines the time zone that `time_of_day` is relative to.
+       * The rules for daylight saving time are determined by the chosen time zone.
+       * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the timeZone field is set. + */ + public boolean hasTimeZone() { + return timeZoneBuilder_ != null || timeZone_ != null; + } + /** + * + * + *
+       * Required. Defines the time zone that `time_of_day` is relative to.
+       * The rules for daylight saving time are determined by the chosen time zone.
+       * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + public com.google.type.TimeZone getTimeZone() { + if (timeZoneBuilder_ == null) { + return timeZone_ == null ? com.google.type.TimeZone.getDefaultInstance() : timeZone_; + } else { + return timeZoneBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Defines the time zone that `time_of_day` is relative to.
+       * The rules for daylight saving time are determined by the chosen time zone.
+       * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTimeZone(com.google.type.TimeZone value) { + if (timeZoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeZone_ = value; + onChanged(); + } else { + timeZoneBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. Defines the time zone that `time_of_day` is relative to.
+       * The rules for daylight saving time are determined by the chosen time zone.
+       * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTimeZone(com.google.type.TimeZone.Builder builderForValue) { + if (timeZoneBuilder_ == null) { + timeZone_ = builderForValue.build(); + onChanged(); + } else { + timeZoneBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. Defines the time zone that `time_of_day` is relative to.
+       * The rules for daylight saving time are determined by the chosen time zone.
+       * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeTimeZone(com.google.type.TimeZone value) { + if (timeZoneBuilder_ == null) { + if (timeZone_ != null) { + timeZone_ = + com.google.type.TimeZone.newBuilder(timeZone_).mergeFrom(value).buildPartial(); + } else { + timeZone_ = value; + } + onChanged(); + } else { + timeZoneBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. Defines the time zone that `time_of_day` is relative to.
+       * The rules for daylight saving time are determined by the chosen time zone.
+       * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearTimeZone() { + if (timeZoneBuilder_ == null) { + timeZone_ = null; + onChanged(); + } else { + timeZone_ = null; + timeZoneBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. Defines the time zone that `time_of_day` is relative to.
+       * The rules for daylight saving time are determined by the chosen time zone.
+       * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.TimeZone.Builder getTimeZoneBuilder() { + + onChanged(); + return getTimeZoneFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Defines the time zone that `time_of_day` is relative to.
+       * The rules for daylight saving time are determined by the chosen time zone.
+       * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder() { + if (timeZoneBuilder_ != null) { + return timeZoneBuilder_.getMessageOrBuilder(); + } else { + return timeZone_ == null ? com.google.type.TimeZone.getDefaultInstance() : timeZone_; + } + } + /** + * + * + *
+       * Required. Defines the time zone that `time_of_day` is relative to.
+       * The rules for daylight saving time are determined by the chosen time zone.
+       * 
+ * + * .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeZone, + com.google.type.TimeZone.Builder, + com.google.type.TimeZoneOrBuilder> + getTimeZoneFieldBuilder() { + if (timeZoneBuilder_ == null) { + timeZoneBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeZone, + com.google.type.TimeZone.Builder, + com.google.type.TimeZoneOrBuilder>( + getTimeZone(), getParentForChildren(), isClean()); + timeZone_ = null; + } + return timeZoneBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+       * Optional. The time that the recurring schedule becomes effective.
+       * Defaults to `create_time` of the patch deployment.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+       * Optional. The time that the recurring schedule becomes effective.
+       * Defaults to `create_time` of the patch deployment.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. The time that the recurring schedule becomes effective.
+       * Defaults to `create_time` of the patch deployment.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. The time that the recurring schedule becomes effective.
+       * Defaults to `create_time` of the patch deployment.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. The time that the recurring schedule becomes effective.
+       * Defaults to `create_time` of the patch deployment.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_) + .mergeFrom(value) + .buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. The time that the recurring schedule becomes effective.
+       * Defaults to `create_time` of the patch deployment.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. The time that the recurring schedule becomes effective.
+       * Defaults to `create_time` of the patch deployment.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. The time that the recurring schedule becomes effective.
+       * Defaults to `create_time` of the patch deployment.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + /** + * + * + *
+       * Optional. The time that the recurring schedule becomes effective.
+       * Defaults to `create_time` of the patch deployment.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+       * Optional. The end time at which a recurring patch deployment schedule is no longer
+       * active.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+       * Optional. The end time at which a recurring patch deployment schedule is no longer
+       * active.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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(); + } + } + /** + * + * + *
+       * Optional. The end time at which a recurring patch deployment schedule is no longer
+       * active.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+       * Optional. The end time at which a recurring patch deployment schedule is no longer
+       * active.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. The end time at which a recurring patch deployment schedule is no longer
+       * active.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+       * Optional. The end time at which a recurring patch deployment schedule is no longer
+       * active.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. The end time at which a recurring patch deployment schedule is no longer
+       * active.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. The end time at which a recurring patch deployment schedule is no longer
+       * active.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+       * Optional. The end time at which a recurring patch deployment schedule is no longer
+       * active.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.type.TimeOfDay timeOfDay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + timeOfDayBuilder_; + /** + * + * + *
+       * Required. Time of the day to run a recurring deployment.
+       * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the timeOfDay field is set. + */ + public boolean hasTimeOfDay() { + return timeOfDayBuilder_ != null || timeOfDay_ != null; + } + /** + * + * + *
+       * Required. Time of the day to run a recurring deployment.
+       * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The timeOfDay. + */ + public com.google.type.TimeOfDay getTimeOfDay() { + if (timeOfDayBuilder_ == null) { + return timeOfDay_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : timeOfDay_; + } else { + return timeOfDayBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Time of the day to run a recurring deployment.
+       * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTimeOfDay(com.google.type.TimeOfDay value) { + if (timeOfDayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeOfDay_ = value; + onChanged(); + } else { + timeOfDayBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. Time of the day to run a recurring deployment.
+       * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTimeOfDay(com.google.type.TimeOfDay.Builder builderForValue) { + if (timeOfDayBuilder_ == null) { + timeOfDay_ = builderForValue.build(); + onChanged(); + } else { + timeOfDayBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. Time of the day to run a recurring deployment.
+       * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTimeOfDay(com.google.type.TimeOfDay value) { + if (timeOfDayBuilder_ == null) { + if (timeOfDay_ != null) { + timeOfDay_ = + com.google.type.TimeOfDay.newBuilder(timeOfDay_).mergeFrom(value).buildPartial(); + } else { + timeOfDay_ = value; + } + onChanged(); + } else { + timeOfDayBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. Time of the day to run a recurring deployment.
+       * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTimeOfDay() { + if (timeOfDayBuilder_ == null) { + timeOfDay_ = null; + onChanged(); + } else { + timeOfDay_ = null; + timeOfDayBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. Time of the day to run a recurring deployment.
+       * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.type.TimeOfDay.Builder getTimeOfDayBuilder() { + + onChanged(); + return getTimeOfDayFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Time of the day to run a recurring deployment.
+       * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.type.TimeOfDayOrBuilder getTimeOfDayOrBuilder() { + if (timeOfDayBuilder_ != null) { + return timeOfDayBuilder_.getMessageOrBuilder(); + } else { + return timeOfDay_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : timeOfDay_; + } + } + /** + * + * + *
+       * Required. Time of the day to run a recurring deployment.
+       * 
+ * + * .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + getTimeOfDayFieldBuilder() { + if (timeOfDayBuilder_ == null) { + timeOfDayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder>( + getTimeOfDay(), getParentForChildren(), isClean()); + timeOfDay_ = null; + } + return timeOfDayBuilder_; + } + + private int frequency_ = 0; + /** + * + * + *
+       * Required. The frequency unit of this recurring schedule.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for frequency. + */ + public int getFrequencyValue() { + return frequency_; + } + /** + * + * + *
+       * Required. The frequency unit of this recurring schedule.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for frequency to set. + * @return This builder for chaining. + */ + public Builder setFrequencyValue(int value) { + frequency_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The frequency unit of this recurring schedule.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The frequency. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency + getFrequency() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency result = + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency.valueOf( + frequency_); + return result == null + ? com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Required. The frequency unit of this recurring schedule.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The frequency to set. + * @return This builder for chaining. + */ + public Builder setFrequency( + com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule.Frequency value) { + if (value == null) { + throw new NullPointerException(); + } + + frequency_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The frequency unit of this recurring schedule.
+       * 
+ * + * + * .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearFrequency() { + + frequency_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule, + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.WeeklyScheduleOrBuilder> + weeklyBuilder_; + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the weekly field is set. + */ + public boolean hasWeekly() { + return scheduleConfigCase_ == 6; + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekly. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule getWeekly() { + if (weeklyBuilder_ == null) { + if (scheduleConfigCase_ == 6) { + return (com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.getDefaultInstance(); + } else { + if (scheduleConfigCase_ == 6) { + return weeklyBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWeekly(com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule value) { + if (weeklyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduleConfig_ = value; + onChanged(); + } else { + weeklyBuilder_.setMessage(value); + } + scheduleConfigCase_ = 6; + return this; + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWeekly( + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.Builder builderForValue) { + if (weeklyBuilder_ == null) { + scheduleConfig_ = builderForValue.build(); + onChanged(); + } else { + weeklyBuilder_.setMessage(builderForValue.build()); + } + scheduleConfigCase_ = 6; + return this; + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeWeekly( + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule value) { + if (weeklyBuilder_ == null) { + if (scheduleConfigCase_ == 6 + && scheduleConfig_ + != com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule + .getDefaultInstance()) { + scheduleConfig_ = + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.newBuilder( + (com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) + scheduleConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + scheduleConfig_ = value; + } + onChanged(); + } else { + if (scheduleConfigCase_ == 6) { + weeklyBuilder_.mergeFrom(value); + } + weeklyBuilder_.setMessage(value); + } + scheduleConfigCase_ = 6; + return this; + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearWeekly() { + if (weeklyBuilder_ == null) { + if (scheduleConfigCase_ == 6) { + scheduleConfigCase_ = 0; + scheduleConfig_ = null; + onChanged(); + } + } else { + if (scheduleConfigCase_ == 6) { + scheduleConfigCase_ = 0; + scheduleConfig_ = null; + } + weeklyBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.Builder + getWeeklyBuilder() { + return getWeeklyFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.WeeklyScheduleOrBuilder + getWeeklyOrBuilder() { + if ((scheduleConfigCase_ == 6) && (weeklyBuilder_ != null)) { + return weeklyBuilder_.getMessageOrBuilder(); + } else { + if (scheduleConfigCase_ == 6) { + return (com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule, + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.WeeklyScheduleOrBuilder> + getWeeklyFieldBuilder() { + if (weeklyBuilder_ == null) { + if (!(scheduleConfigCase_ == 6)) { + scheduleConfig_ = + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.getDefaultInstance(); + } + weeklyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule, + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.WeeklyScheduleOrBuilder>( + (com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) scheduleConfig_, + getParentForChildren(), + isClean()); + scheduleConfig_ = null; + } + scheduleConfigCase_ = 6; + onChanged(); + ; + return weeklyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule, + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.MonthlyScheduleOrBuilder> + monthlyBuilder_; + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the monthly field is set. + */ + public boolean hasMonthly() { + return scheduleConfigCase_ == 7; + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The monthly. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule getMonthly() { + if (monthlyBuilder_ == null) { + if (scheduleConfigCase_ == 7) { + return (com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.getDefaultInstance(); + } else { + if (scheduleConfigCase_ == 7) { + return monthlyBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMonthly( + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule value) { + if (monthlyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduleConfig_ = value; + onChanged(); + } else { + monthlyBuilder_.setMessage(value); + } + scheduleConfigCase_ = 7; + return this; + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMonthly( + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.Builder builderForValue) { + if (monthlyBuilder_ == null) { + scheduleConfig_ = builderForValue.build(); + onChanged(); + } else { + monthlyBuilder_.setMessage(builderForValue.build()); + } + scheduleConfigCase_ = 7; + return this; + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMonthly( + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule value) { + if (monthlyBuilder_ == null) { + if (scheduleConfigCase_ == 7 + && scheduleConfig_ + != com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule + .getDefaultInstance()) { + scheduleConfig_ = + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.newBuilder( + (com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) + scheduleConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + scheduleConfig_ = value; + } + onChanged(); + } else { + if (scheduleConfigCase_ == 7) { + monthlyBuilder_.mergeFrom(value); + } + monthlyBuilder_.setMessage(value); + } + scheduleConfigCase_ = 7; + return this; + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMonthly() { + if (monthlyBuilder_ == null) { + if (scheduleConfigCase_ == 7) { + scheduleConfigCase_ = 0; + scheduleConfig_ = null; + onChanged(); + } + } else { + if (scheduleConfigCase_ == 7) { + scheduleConfigCase_ = 0; + scheduleConfig_ = null; + } + monthlyBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.Builder + getMonthlyBuilder() { + return getMonthlyFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.MonthlyScheduleOrBuilder + getMonthlyOrBuilder() { + if ((scheduleConfigCase_ == 7) && (monthlyBuilder_ != null)) { + return monthlyBuilder_.getMessageOrBuilder(); + } else { + if (scheduleConfigCase_ == 7) { + return (com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule, + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.MonthlyScheduleOrBuilder> + getMonthlyFieldBuilder() { + if (monthlyBuilder_ == null) { + if (!(scheduleConfigCase_ == 7)) { + scheduleConfig_ = + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.getDefaultInstance(); + } + monthlyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule, + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.MonthlyScheduleOrBuilder>( + (com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) scheduleConfig_, + getParentForChildren(), + isClean()); + scheduleConfig_ = null; + } + scheduleConfigCase_ = 7; + onChanged(); + ; + return monthlyBuilder_; + } + + private com.google.protobuf.Timestamp lastExecuteTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastExecuteTimeBuilder_; + /** + * + * + *
+       * Output only. The time the last patch job ran successfully.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastExecuteTime field is set. + */ + public boolean hasLastExecuteTime() { + return lastExecuteTimeBuilder_ != null || lastExecuteTime_ != null; + } + /** + * + * + *
+       * Output only. The time the last patch job ran successfully.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecuteTime. + */ + public com.google.protobuf.Timestamp getLastExecuteTime() { + if (lastExecuteTimeBuilder_ == null) { + return lastExecuteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastExecuteTime_; + } else { + return lastExecuteTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. The time the last patch job ran successfully.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastExecuteTime(com.google.protobuf.Timestamp value) { + if (lastExecuteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastExecuteTime_ = value; + onChanged(); + } else { + lastExecuteTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The time the last patch job ran successfully.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastExecuteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastExecuteTimeBuilder_ == null) { + lastExecuteTime_ = builderForValue.build(); + onChanged(); + } else { + lastExecuteTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Output only. The time the last patch job ran successfully.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastExecuteTime(com.google.protobuf.Timestamp value) { + if (lastExecuteTimeBuilder_ == null) { + if (lastExecuteTime_ != null) { + lastExecuteTime_ = + com.google.protobuf.Timestamp.newBuilder(lastExecuteTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastExecuteTime_ = value; + } + onChanged(); + } else { + lastExecuteTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The time the last patch job ran successfully.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastExecuteTime() { + if (lastExecuteTimeBuilder_ == null) { + lastExecuteTime_ = null; + onChanged(); + } else { + lastExecuteTime_ = null; + lastExecuteTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Output only. The time the last patch job ran successfully.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastExecuteTimeBuilder() { + + onChanged(); + return getLastExecuteTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. The time the last patch job ran successfully.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastExecuteTimeOrBuilder() { + if (lastExecuteTimeBuilder_ != null) { + return lastExecuteTimeBuilder_.getMessageOrBuilder(); + } else { + return lastExecuteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastExecuteTime_; + } + } + /** + * + * + *
+       * Output only. The time the last patch job ran successfully.
+       * 
+ * + * + * .google.protobuf.Timestamp last_execute_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> + getLastExecuteTimeFieldBuilder() { + if (lastExecuteTimeBuilder_ == null) { + lastExecuteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastExecuteTime(), getParentForChildren(), isClean()); + lastExecuteTime_ = null; + } + return lastExecuteTimeBuilder_; + } + + private com.google.protobuf.Timestamp nextExecuteTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + nextExecuteTimeBuilder_; + /** + * + * + *
+       * Output only. The time the next patch job is scheduled to run.
+       * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the nextExecuteTime field is set. + */ + public boolean hasNextExecuteTime() { + return nextExecuteTimeBuilder_ != null || nextExecuteTime_ != null; + } + /** + * + * + *
+       * Output only. The time the next patch job is scheduled to run.
+       * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The nextExecuteTime. + */ + public com.google.protobuf.Timestamp getNextExecuteTime() { + if (nextExecuteTimeBuilder_ == null) { + return nextExecuteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : nextExecuteTime_; + } else { + return nextExecuteTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. The time the next patch job is scheduled to run.
+       * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setNextExecuteTime(com.google.protobuf.Timestamp value) { + if (nextExecuteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nextExecuteTime_ = value; + onChanged(); + } else { + nextExecuteTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The time the next patch job is scheduled to run.
+       * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setNextExecuteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (nextExecuteTimeBuilder_ == null) { + nextExecuteTime_ = builderForValue.build(); + onChanged(); + } else { + nextExecuteTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Output only. The time the next patch job is scheduled to run.
+       * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeNextExecuteTime(com.google.protobuf.Timestamp value) { + if (nextExecuteTimeBuilder_ == null) { + if (nextExecuteTime_ != null) { + nextExecuteTime_ = + com.google.protobuf.Timestamp.newBuilder(nextExecuteTime_) + .mergeFrom(value) + .buildPartial(); + } else { + nextExecuteTime_ = value; + } + onChanged(); + } else { + nextExecuteTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The time the next patch job is scheduled to run.
+       * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearNextExecuteTime() { + if (nextExecuteTimeBuilder_ == null) { + nextExecuteTime_ = null; + onChanged(); + } else { + nextExecuteTime_ = null; + nextExecuteTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Output only. The time the next patch job is scheduled to run.
+       * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getNextExecuteTimeBuilder() { + + onChanged(); + return getNextExecuteTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. The time the next patch job is scheduled to run.
+       * 
+ * + * + * .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getNextExecuteTimeOrBuilder() { + if (nextExecuteTimeBuilder_ != null) { + return nextExecuteTimeBuilder_.getMessageOrBuilder(); + } else { + return nextExecuteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : nextExecuteTime_; + } + } + /** + * + * + *
+       * Output only. The time the next patch job is scheduled to run.
+       * 
+ * + * + * .google.protobuf.Timestamp next_execute_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> + getNextExecuteTimeFieldBuilder() { + if (nextExecuteTimeBuilder_ == null) { + nextExecuteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getNextExecuteTime(), getParentForChildren(), isClean()); + nextExecuteTime_ = null; + } + return nextExecuteTimeBuilder_; + } + + @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.osconfig.v1.RecurringSchedule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.RecurringSchedule) + private static final com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule(); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.RecurringSchedule + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecurringSchedule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecurringSchedule(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.osconfig.v1.PatchDeployments.RecurringSchedule + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WeeklyScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.WeeklySchedule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for dayOfWeek. + */ + int getDayOfWeekValue(); + /** + * + * + *
+     * Required. Day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dayOfWeek. + */ + com.google.type.DayOfWeek getDayOfWeek(); + } + /** + * + * + *
+   * Represents a weekly schedule.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.WeeklySchedule} + */ + public static final class WeeklySchedule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.WeeklySchedule) + WeeklyScheduleOrBuilder { + private static final long serialVersionUID = 0L; + // Use WeeklySchedule.newBuilder() to construct. + private WeeklySchedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WeeklySchedule() { + dayOfWeek_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WeeklySchedule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WeeklySchedule( + 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(); + + dayOfWeek_ = 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.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_WeeklySchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_WeeklySchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.class, + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.Builder.class); + } + + public static final int DAY_OF_WEEK_FIELD_NUMBER = 1; + private int dayOfWeek_; + /** + * + * + *
+     * Required. Day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for dayOfWeek. + */ + public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + * + * + *
+     * Required. Day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dayOfWeek. + */ + public com.google.type.DayOfWeek getDayOfWeek() { + @SuppressWarnings("deprecation") + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.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 (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + output.writeEnum(1, dayOfWeek_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, dayOfWeek_); + } + 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.osconfig.v1.PatchDeployments.WeeklySchedule)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule other = + (com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) obj; + + if (dayOfWeek_ != other.dayOfWeek_) 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) + DAY_OF_WEEK_FIELD_NUMBER; + hash = (53 * hash) + dayOfWeek_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule 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.osconfig.v1.PatchDeployments.WeeklySchedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule 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.osconfig.v1.PatchDeployments.WeeklySchedule parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule 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.osconfig.v1.PatchDeployments.WeeklySchedule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule 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.osconfig.v1.PatchDeployments.WeeklySchedule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule 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.osconfig.v1.PatchDeployments.WeeklySchedule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents a weekly schedule.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.WeeklySchedule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.WeeklySchedule) + com.google.cloud.osconfig.v1.PatchDeployments.WeeklyScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_WeeklySchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_WeeklySchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.class, + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.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(); + dayOfWeek_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_WeeklySchedule_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule build() { + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule buildPartial() { + com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule result = + new com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule(this); + result.dayOfWeek_ = dayOfWeek_; + 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.osconfig.v1.PatchDeployments.WeeklySchedule) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule other) { + if (other + == com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule.getDefaultInstance()) + return this; + if (other.dayOfWeek_ != 0) { + setDayOfWeekValue(other.getDayOfWeekValue()); + } + 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.osconfig.v1.PatchDeployments.WeeklySchedule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dayOfWeek_ = 0; + /** + * + * + *
+       * Required. Day of the week.
+       * 
+ * + * .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for dayOfWeek. + */ + public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + * + * + *
+       * Required. Day of the week.
+       * 
+ * + * .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeekValue(int value) { + dayOfWeek_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Day of the week.
+       * 
+ * + * .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dayOfWeek. + */ + public com.google.type.DayOfWeek getDayOfWeek() { + @SuppressWarnings("deprecation") + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + /** + * + * + *
+       * Required. Day of the week.
+       * 
+ * + * .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeek(com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + + dayOfWeek_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Day of the week.
+       * 
+ * + * .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearDayOfWeek() { + + dayOfWeek_ = 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.osconfig.v1.WeeklySchedule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.WeeklySchedule) + private static final com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule(); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeeklySchedule + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WeeklySchedule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WeeklySchedule(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.osconfig.v1.PatchDeployments.WeeklySchedule + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MonthlyScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.MonthlySchedule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Week day in a month.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the weekDayOfMonth field is set. + */ + boolean hasWeekDayOfMonth(); + /** + * + * + *
+     * Required. Week day in a month.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekDayOfMonth. + */ + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth getWeekDayOfMonth(); + /** + * + * + *
+     * Required. Week day in a month.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonthOrBuilder + getWeekDayOfMonthOrBuilder(); + + /** + * + * + *
+     * Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1
+     * indicates the last day of the month.
+     * Months without the target day will be skipped. For example, a schedule to
+     * run "every month on the 31st" will not run in February, April, June, etc.
+     * 
+ * + * int32 month_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The monthDay. + */ + int getMonthDay(); + + public com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.DayOfMonthCase + getDayOfMonthCase(); + } + /** + * + * + *
+   * Represents a monthly schedule. An example of a valid monthly schedule is
+   * "on the third Tuesday of the month" or "on the 15th of the month".
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.MonthlySchedule} + */ + public static final class MonthlySchedule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.MonthlySchedule) + MonthlyScheduleOrBuilder { + private static final long serialVersionUID = 0L; + // Use MonthlySchedule.newBuilder() to construct. + private MonthlySchedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MonthlySchedule() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MonthlySchedule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MonthlySchedule( + 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.osconfig.v1.PatchDeployments.WeekDayOfMonth.Builder subBuilder = + null; + if (dayOfMonthCase_ == 1) { + subBuilder = + ((com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) dayOfMonth_) + .toBuilder(); + } + dayOfMonth_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) dayOfMonth_); + dayOfMonth_ = subBuilder.buildPartial(); + } + dayOfMonthCase_ = 1; + break; + } + case 16: + { + dayOfMonthCase_ = 2; + dayOfMonth_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_MonthlySchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_MonthlySchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.class, + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.Builder.class); + } + + private int dayOfMonthCase_ = 0; + private java.lang.Object dayOfMonth_; + + public enum DayOfMonthCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + WEEK_DAY_OF_MONTH(1), + MONTH_DAY(2), + DAYOFMONTH_NOT_SET(0); + private final int value; + + private DayOfMonthCase(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 DayOfMonthCase valueOf(int value) { + return forNumber(value); + } + + public static DayOfMonthCase forNumber(int value) { + switch (value) { + case 1: + return WEEK_DAY_OF_MONTH; + case 2: + return MONTH_DAY; + case 0: + return DAYOFMONTH_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DayOfMonthCase getDayOfMonthCase() { + return DayOfMonthCase.forNumber(dayOfMonthCase_); + } + + public static final int WEEK_DAY_OF_MONTH_FIELD_NUMBER = 1; + /** + * + * + *
+     * Required. Week day in a month.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the weekDayOfMonth field is set. + */ + public boolean hasWeekDayOfMonth() { + return dayOfMonthCase_ == 1; + } + /** + * + * + *
+     * Required. Week day in a month.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekDayOfMonth. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth getWeekDayOfMonth() { + if (dayOfMonthCase_ == 1) { + return (com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) dayOfMonth_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.getDefaultInstance(); + } + /** + * + * + *
+     * Required. Week day in a month.
+     * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonthOrBuilder + getWeekDayOfMonthOrBuilder() { + if (dayOfMonthCase_ == 1) { + return (com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) dayOfMonth_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.getDefaultInstance(); + } + + public static final int MONTH_DAY_FIELD_NUMBER = 2; + /** + * + * + *
+     * Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1
+     * indicates the last day of the month.
+     * Months without the target day will be skipped. For example, a schedule to
+     * run "every month on the 31st" will not run in February, April, June, etc.
+     * 
+ * + * int32 month_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The monthDay. + */ + public int getMonthDay() { + if (dayOfMonthCase_ == 2) { + return (java.lang.Integer) dayOfMonth_; + } + return 0; + } + + 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 (dayOfMonthCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) dayOfMonth_); + } + if (dayOfMonthCase_ == 2) { + output.writeInt32(2, (int) ((java.lang.Integer) dayOfMonth_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dayOfMonthCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) dayOfMonth_); + } + if (dayOfMonthCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 2, (int) ((java.lang.Integer) dayOfMonth_)); + } + 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.osconfig.v1.PatchDeployments.MonthlySchedule)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule other = + (com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) obj; + + if (!getDayOfMonthCase().equals(other.getDayOfMonthCase())) return false; + switch (dayOfMonthCase_) { + case 1: + if (!getWeekDayOfMonth().equals(other.getWeekDayOfMonth())) return false; + break; + case 2: + if (getMonthDay() != other.getMonthDay()) 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 (dayOfMonthCase_) { + case 1: + hash = (37 * hash) + WEEK_DAY_OF_MONTH_FIELD_NUMBER; + hash = (53 * hash) + getWeekDayOfMonth().hashCode(); + break; + case 2: + hash = (37 * hash) + MONTH_DAY_FIELD_NUMBER; + hash = (53 * hash) + getMonthDay(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule 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.osconfig.v1.PatchDeployments.MonthlySchedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule 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.osconfig.v1.PatchDeployments.MonthlySchedule parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule 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.osconfig.v1.PatchDeployments.MonthlySchedule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule 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.osconfig.v1.PatchDeployments.MonthlySchedule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule 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.osconfig.v1.PatchDeployments.MonthlySchedule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents a monthly schedule. An example of a valid monthly schedule is
+     * "on the third Tuesday of the month" or "on the 15th of the month".
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.MonthlySchedule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.MonthlySchedule) + com.google.cloud.osconfig.v1.PatchDeployments.MonthlyScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_MonthlySchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_MonthlySchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.class, + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.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(); + dayOfMonthCase_ = 0; + dayOfMonth_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_MonthlySchedule_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule build() { + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule buildPartial() { + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule result = + new com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule(this); + if (dayOfMonthCase_ == 1) { + if (weekDayOfMonthBuilder_ == null) { + result.dayOfMonth_ = dayOfMonth_; + } else { + result.dayOfMonth_ = weekDayOfMonthBuilder_.build(); + } + } + if (dayOfMonthCase_ == 2) { + result.dayOfMonth_ = dayOfMonth_; + } + result.dayOfMonthCase_ = dayOfMonthCase_; + 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.osconfig.v1.PatchDeployments.MonthlySchedule) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule other) { + if (other + == com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule.getDefaultInstance()) + return this; + switch (other.getDayOfMonthCase()) { + case WEEK_DAY_OF_MONTH: + { + mergeWeekDayOfMonth(other.getWeekDayOfMonth()); + break; + } + case MONTH_DAY: + { + setMonthDay(other.getMonthDay()); + break; + } + case DAYOFMONTH_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.osconfig.v1.PatchDeployments.MonthlySchedule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dayOfMonthCase_ = 0; + private java.lang.Object dayOfMonth_; + + public DayOfMonthCase getDayOfMonthCase() { + return DayOfMonthCase.forNumber(dayOfMonthCase_); + } + + public Builder clearDayOfMonth() { + dayOfMonthCase_ = 0; + dayOfMonth_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth, + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonthOrBuilder> + weekDayOfMonthBuilder_; + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the weekDayOfMonth field is set. + */ + public boolean hasWeekDayOfMonth() { + return dayOfMonthCase_ == 1; + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekDayOfMonth. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth getWeekDayOfMonth() { + if (weekDayOfMonthBuilder_ == null) { + if (dayOfMonthCase_ == 1) { + return (com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) dayOfMonth_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.getDefaultInstance(); + } else { + if (dayOfMonthCase_ == 1) { + return weekDayOfMonthBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWeekDayOfMonth( + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth value) { + if (weekDayOfMonthBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dayOfMonth_ = value; + onChanged(); + } else { + weekDayOfMonthBuilder_.setMessage(value); + } + dayOfMonthCase_ = 1; + return this; + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWeekDayOfMonth( + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.Builder builderForValue) { + if (weekDayOfMonthBuilder_ == null) { + dayOfMonth_ = builderForValue.build(); + onChanged(); + } else { + weekDayOfMonthBuilder_.setMessage(builderForValue.build()); + } + dayOfMonthCase_ = 1; + return this; + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeWeekDayOfMonth( + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth value) { + if (weekDayOfMonthBuilder_ == null) { + if (dayOfMonthCase_ == 1 + && dayOfMonth_ + != com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth + .getDefaultInstance()) { + dayOfMonth_ = + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.newBuilder( + (com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) dayOfMonth_) + .mergeFrom(value) + .buildPartial(); + } else { + dayOfMonth_ = value; + } + onChanged(); + } else { + if (dayOfMonthCase_ == 1) { + weekDayOfMonthBuilder_.mergeFrom(value); + } + weekDayOfMonthBuilder_.setMessage(value); + } + dayOfMonthCase_ = 1; + return this; + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearWeekDayOfMonth() { + if (weekDayOfMonthBuilder_ == null) { + if (dayOfMonthCase_ == 1) { + dayOfMonthCase_ = 0; + dayOfMonth_ = null; + onChanged(); + } + } else { + if (dayOfMonthCase_ == 1) { + dayOfMonthCase_ = 0; + dayOfMonth_ = null; + } + weekDayOfMonthBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.Builder + getWeekDayOfMonthBuilder() { + return getWeekDayOfMonthFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonthOrBuilder + getWeekDayOfMonthOrBuilder() { + if ((dayOfMonthCase_ == 1) && (weekDayOfMonthBuilder_ != null)) { + return weekDayOfMonthBuilder_.getMessageOrBuilder(); + } else { + if (dayOfMonthCase_ == 1) { + return (com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) dayOfMonth_; + } + return com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth, + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonthOrBuilder> + getWeekDayOfMonthFieldBuilder() { + if (weekDayOfMonthBuilder_ == null) { + if (!(dayOfMonthCase_ == 1)) { + dayOfMonth_ = + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.getDefaultInstance(); + } + weekDayOfMonthBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth, + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonthOrBuilder>( + (com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) dayOfMonth_, + getParentForChildren(), + isClean()); + dayOfMonth_ = null; + } + dayOfMonthCase_ = 1; + onChanged(); + ; + return weekDayOfMonthBuilder_; + } + + /** + * + * + *
+       * Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1
+       * indicates the last day of the month.
+       * Months without the target day will be skipped. For example, a schedule to
+       * run "every month on the 31st" will not run in February, April, June, etc.
+       * 
+ * + * int32 month_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The monthDay. + */ + public int getMonthDay() { + if (dayOfMonthCase_ == 2) { + return (java.lang.Integer) dayOfMonth_; + } + return 0; + } + /** + * + * + *
+       * Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1
+       * indicates the last day of the month.
+       * Months without the target day will be skipped. For example, a schedule to
+       * run "every month on the 31st" will not run in February, April, June, etc.
+       * 
+ * + * int32 month_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The monthDay to set. + * @return This builder for chaining. + */ + public Builder setMonthDay(int value) { + dayOfMonthCase_ = 2; + dayOfMonth_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1
+       * indicates the last day of the month.
+       * Months without the target day will be skipped. For example, a schedule to
+       * run "every month on the 31st" will not run in February, April, June, etc.
+       * 
+ * + * int32 month_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMonthDay() { + if (dayOfMonthCase_ == 2) { + dayOfMonthCase_ = 0; + dayOfMonth_ = 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.osconfig.v1.MonthlySchedule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.MonthlySchedule) + private static final com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule(); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.MonthlySchedule + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MonthlySchedule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MonthlySchedule(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.osconfig.v1.PatchDeployments.MonthlySchedule + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WeekDayOfMonthOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.WeekDayOfMonth) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1
+     * indicates the last week of the month.
+     * 
+ * + * int32 week_ordinal = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The weekOrdinal. + */ + int getWeekOrdinal(); + + /** + * + * + *
+     * Required. A day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for dayOfWeek. + */ + int getDayOfWeekValue(); + /** + * + * + *
+     * Required. A day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dayOfWeek. + */ + com.google.type.DayOfWeek getDayOfWeek(); + } + /** + * + * + *
+   * Represents one week day in a month. An example is "the 4th Sunday".
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.WeekDayOfMonth} + */ + public static final class WeekDayOfMonth extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.WeekDayOfMonth) + WeekDayOfMonthOrBuilder { + private static final long serialVersionUID = 0L; + // Use WeekDayOfMonth.newBuilder() to construct. + private WeekDayOfMonth(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WeekDayOfMonth() { + dayOfWeek_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WeekDayOfMonth(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WeekDayOfMonth( + 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: + { + weekOrdinal_ = input.readInt32(); + break; + } + case 16: + { + int rawValue = input.readEnum(); + + dayOfWeek_ = 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.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_WeekDayOfMonth_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_WeekDayOfMonth_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.class, + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.Builder.class); + } + + public static final int WEEK_ORDINAL_FIELD_NUMBER = 1; + private int weekOrdinal_; + /** + * + * + *
+     * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1
+     * indicates the last week of the month.
+     * 
+ * + * int32 week_ordinal = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The weekOrdinal. + */ + public int getWeekOrdinal() { + return weekOrdinal_; + } + + public static final int DAY_OF_WEEK_FIELD_NUMBER = 2; + private int dayOfWeek_; + /** + * + * + *
+     * Required. A day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for dayOfWeek. + */ + public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + * + * + *
+     * Required. A day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dayOfWeek. + */ + public com.google.type.DayOfWeek getDayOfWeek() { + @SuppressWarnings("deprecation") + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.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 (weekOrdinal_ != 0) { + output.writeInt32(1, weekOrdinal_); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + output.writeEnum(2, dayOfWeek_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (weekOrdinal_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, weekOrdinal_); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, dayOfWeek_); + } + 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.osconfig.v1.PatchDeployments.WeekDayOfMonth)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth other = + (com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) obj; + + if (getWeekOrdinal() != other.getWeekOrdinal()) return false; + if (dayOfWeek_ != other.dayOfWeek_) 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) + WEEK_ORDINAL_FIELD_NUMBER; + hash = (53 * hash) + getWeekOrdinal(); + hash = (37 * hash) + DAY_OF_WEEK_FIELD_NUMBER; + hash = (53 * hash) + dayOfWeek_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth 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.osconfig.v1.PatchDeployments.WeekDayOfMonth parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth 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.osconfig.v1.PatchDeployments.WeekDayOfMonth parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth 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.osconfig.v1.PatchDeployments.WeekDayOfMonth parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth 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.osconfig.v1.PatchDeployments.WeekDayOfMonth parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth 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.osconfig.v1.PatchDeployments.WeekDayOfMonth 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 one week day in a month. An example is "the 4th Sunday".
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.WeekDayOfMonth} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.WeekDayOfMonth) + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonthOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_WeekDayOfMonth_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_WeekDayOfMonth_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.class, + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.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(); + weekOrdinal_ = 0; + + dayOfWeek_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_WeekDayOfMonth_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth build() { + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth buildPartial() { + com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth result = + new com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth(this); + result.weekOrdinal_ = weekOrdinal_; + result.dayOfWeek_ = dayOfWeek_; + 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.osconfig.v1.PatchDeployments.WeekDayOfMonth) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth other) { + if (other + == com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth.getDefaultInstance()) + return this; + if (other.getWeekOrdinal() != 0) { + setWeekOrdinal(other.getWeekOrdinal()); + } + if (other.dayOfWeek_ != 0) { + setDayOfWeekValue(other.getDayOfWeekValue()); + } + 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.osconfig.v1.PatchDeployments.WeekDayOfMonth parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int weekOrdinal_; + /** + * + * + *
+       * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1
+       * indicates the last week of the month.
+       * 
+ * + * int32 week_ordinal = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The weekOrdinal. + */ + public int getWeekOrdinal() { + return weekOrdinal_; + } + /** + * + * + *
+       * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1
+       * indicates the last week of the month.
+       * 
+ * + * int32 week_ordinal = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The weekOrdinal to set. + * @return This builder for chaining. + */ + public Builder setWeekOrdinal(int value) { + + weekOrdinal_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1
+       * indicates the last week of the month.
+       * 
+ * + * int32 week_ordinal = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearWeekOrdinal() { + + weekOrdinal_ = 0; + onChanged(); + return this; + } + + private int dayOfWeek_ = 0; + /** + * + * + *
+       * Required. A day of the week.
+       * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for dayOfWeek. + */ + public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + * + * + *
+       * Required. A day of the week.
+       * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeekValue(int value) { + dayOfWeek_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A day of the week.
+       * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dayOfWeek. + */ + public com.google.type.DayOfWeek getDayOfWeek() { + @SuppressWarnings("deprecation") + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + /** + * + * + *
+       * Required. A day of the week.
+       * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeek(com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + + dayOfWeek_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A day of the week.
+       * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearDayOfWeek() { + + dayOfWeek_ = 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.osconfig.v1.WeekDayOfMonth) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.WeekDayOfMonth) + private static final com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth(); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.WeekDayOfMonth + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WeekDayOfMonth parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WeekDayOfMonth(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.osconfig.v1.PatchDeployments.WeekDayOfMonth + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CreatePatchDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.CreatePatchDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The project to apply this patch deployment to in the form `projects/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+     * Required. The project to apply this patch deployment to in the form `projects/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+     * Required. A name for the patch deployment in the project. When creating a name
+     * the following rules apply:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the project.
+     * 
+ * + * string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The patchDeploymentId. + */ + java.lang.String getPatchDeploymentId(); + /** + * + * + *
+     * Required. A name for the patch deployment in the project. When creating a name
+     * the following rules apply:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the project.
+     * 
+ * + * string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for patchDeploymentId. + */ + com.google.protobuf.ByteString getPatchDeploymentIdBytes(); + + /** + * + * + *
+     * Required. The patch deployment to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the patchDeployment field is set. + */ + boolean hasPatchDeployment(); + /** + * + * + *
+     * Required. The patch deployment to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The patchDeployment. + */ + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment getPatchDeployment(); + /** + * + * + *
+     * Required. The patch deployment to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder + getPatchDeploymentOrBuilder(); + } + /** + * + * + *
+   * A request message for creating a patch deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.CreatePatchDeploymentRequest} + */ + public static final class CreatePatchDeploymentRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.CreatePatchDeploymentRequest) + CreatePatchDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreatePatchDeploymentRequest.newBuilder() to construct. + private CreatePatchDeploymentRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePatchDeploymentRequest() { + parent_ = ""; + patchDeploymentId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePatchDeploymentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreatePatchDeploymentRequest( + 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(); + + patchDeploymentId_ = s; + break; + } + case 26: + { + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder subBuilder = + null; + if (patchDeployment_ != null) { + subBuilder = patchDeployment_.toBuilder(); + } + patchDeployment_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(patchDeployment_); + patchDeployment_ = 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.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_CreatePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_CreatePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest.class, + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+     * Required. The project to apply this patch deployment to in the form `projects/*`.
+     * 
+ * + * + * 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) { + 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 project to apply this patch deployment to in the form `projects/*`.
+     * 
+ * + * + * 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 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 PATCH_DEPLOYMENT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object patchDeploymentId_; + /** + * + * + *
+     * Required. A name for the patch deployment in the project. When creating a name
+     * the following rules apply:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the project.
+     * 
+ * + * string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The patchDeploymentId. + */ + public java.lang.String getPatchDeploymentId() { + java.lang.Object ref = patchDeploymentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + patchDeploymentId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. A name for the patch deployment in the project. When creating a name
+     * the following rules apply:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the project.
+     * 
+ * + * string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for patchDeploymentId. + */ + public com.google.protobuf.ByteString getPatchDeploymentIdBytes() { + java.lang.Object ref = patchDeploymentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + patchDeploymentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATCH_DEPLOYMENT_FIELD_NUMBER = 3; + private com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment patchDeployment_; + /** + * + * + *
+     * Required. The patch deployment to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the patchDeployment field is set. + */ + public boolean hasPatchDeployment() { + return patchDeployment_ != null; + } + /** + * + * + *
+     * Required. The patch deployment to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The patchDeployment. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment getPatchDeployment() { + return patchDeployment_ == null + ? com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.getDefaultInstance() + : patchDeployment_; + } + /** + * + * + *
+     * Required. The patch deployment to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder + getPatchDeploymentOrBuilder() { + return getPatchDeployment(); + } + + 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 (!getPatchDeploymentIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, patchDeploymentId_); + } + if (patchDeployment_ != null) { + output.writeMessage(3, getPatchDeployment()); + } + 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 (!getPatchDeploymentIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, patchDeploymentId_); + } + if (patchDeployment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPatchDeployment()); + } + 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.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest other = + (com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPatchDeploymentId().equals(other.getPatchDeploymentId())) return false; + if (hasPatchDeployment() != other.hasPatchDeployment()) return false; + if (hasPatchDeployment()) { + if (!getPatchDeployment().equals(other.getPatchDeployment())) 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) + PATCH_DEPLOYMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getPatchDeploymentId().hashCode(); + if (hasPatchDeployment()) { + hash = (37 * hash) + PATCH_DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getPatchDeployment().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + 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.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + 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.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + 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.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + 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.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + 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.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest 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 request message for creating a patch deployment.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.CreatePatchDeploymentRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.CreatePatchDeploymentRequest) + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_CreatePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_CreatePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest.class, + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest.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_ = ""; + + patchDeploymentId_ = ""; + + if (patchDeploymentBuilder_ == null) { + patchDeployment_ = null; + } else { + patchDeployment_ = null; + patchDeploymentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_CreatePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest build() { + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + buildPartial() { + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest result = + new com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest(this); + result.parent_ = parent_; + result.patchDeploymentId_ = patchDeploymentId_; + if (patchDeploymentBuilder_ == null) { + result.patchDeployment_ = patchDeployment_; + } else { + result.patchDeployment_ = patchDeploymentBuilder_.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.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest other) { + if (other + == com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getPatchDeploymentId().isEmpty()) { + patchDeploymentId_ = other.patchDeploymentId_; + onChanged(); + } + if (other.hasPatchDeployment()) { + mergePatchDeployment(other.getPatchDeployment()); + } + 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.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+       * Required. The project to apply this patch deployment to in the form `projects/*`.
+       * 
+ * + * + * 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 project to apply this patch deployment to in the form `projects/*`.
+       * 
+ * + * + * 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 project to apply this patch deployment to in the form `projects/*`.
+       * 
+ * + * + * 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 project to apply this patch deployment to in the form `projects/*`.
+       * 
+ * + * + * 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 project to apply this patch deployment to in the form `projects/*`.
+       * 
+ * + * + * 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 patchDeploymentId_ = ""; + /** + * + * + *
+       * Required. A name for the patch deployment in the project. When creating a name
+       * the following rules apply:
+       * * Must contain only lowercase letters, numbers, and hyphens.
+       * * Must start with a letter.
+       * * Must be between 1-63 characters.
+       * * Must end with a number or a letter.
+       * * Must be unique within the project.
+       * 
+ * + * string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The patchDeploymentId. + */ + public java.lang.String getPatchDeploymentId() { + java.lang.Object ref = patchDeploymentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + patchDeploymentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. A name for the patch deployment in the project. When creating a name
+       * the following rules apply:
+       * * Must contain only lowercase letters, numbers, and hyphens.
+       * * Must start with a letter.
+       * * Must be between 1-63 characters.
+       * * Must end with a number or a letter.
+       * * Must be unique within the project.
+       * 
+ * + * string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for patchDeploymentId. + */ + public com.google.protobuf.ByteString getPatchDeploymentIdBytes() { + java.lang.Object ref = patchDeploymentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + patchDeploymentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. A name for the patch deployment in the project. When creating a name
+       * the following rules apply:
+       * * Must contain only lowercase letters, numbers, and hyphens.
+       * * Must start with a letter.
+       * * Must be between 1-63 characters.
+       * * Must end with a number or a letter.
+       * * Must be unique within the project.
+       * 
+ * + * string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The patchDeploymentId to set. + * @return This builder for chaining. + */ + public Builder setPatchDeploymentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + patchDeploymentId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A name for the patch deployment in the project. When creating a name
+       * the following rules apply:
+       * * Must contain only lowercase letters, numbers, and hyphens.
+       * * Must start with a letter.
+       * * Must be between 1-63 characters.
+       * * Must end with a number or a letter.
+       * * Must be unique within the project.
+       * 
+ * + * string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPatchDeploymentId() { + + patchDeploymentId_ = getDefaultInstance().getPatchDeploymentId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A name for the patch deployment in the project. When creating a name
+       * the following rules apply:
+       * * Must contain only lowercase letters, numbers, and hyphens.
+       * * Must start with a letter.
+       * * Must be between 1-63 characters.
+       * * Must end with a number or a letter.
+       * * Must be unique within the project.
+       * 
+ * + * string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for patchDeploymentId to set. + * @return This builder for chaining. + */ + public Builder setPatchDeploymentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + patchDeploymentId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment patchDeployment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder> + patchDeploymentBuilder_; + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the patchDeployment field is set. + */ + public boolean hasPatchDeployment() { + return patchDeploymentBuilder_ != null || patchDeployment_ != null; + } + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The patchDeployment. + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment getPatchDeployment() { + if (patchDeploymentBuilder_ == null) { + return patchDeployment_ == null + ? com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.getDefaultInstance() + : patchDeployment_; + } else { + return patchDeploymentBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment value) { + if (patchDeploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + patchDeployment_ = value; + onChanged(); + } else { + patchDeploymentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder builderForValue) { + if (patchDeploymentBuilder_ == null) { + patchDeployment_ = builderForValue.build(); + onChanged(); + } else { + patchDeploymentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePatchDeployment( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment value) { + if (patchDeploymentBuilder_ == null) { + if (patchDeployment_ != null) { + patchDeployment_ = + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.newBuilder( + patchDeployment_) + .mergeFrom(value) + .buildPartial(); + } else { + patchDeployment_ = value; + } + onChanged(); + } else { + patchDeploymentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPatchDeployment() { + if (patchDeploymentBuilder_ == null) { + patchDeployment_ = null; + onChanged(); + } else { + patchDeployment_ = null; + patchDeploymentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder + getPatchDeploymentBuilder() { + + onChanged(); + return getPatchDeploymentFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder + getPatchDeploymentOrBuilder() { + if (patchDeploymentBuilder_ != null) { + return patchDeploymentBuilder_.getMessageOrBuilder(); + } else { + return patchDeployment_ == null + ? com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.getDefaultInstance() + : patchDeployment_; + } + } + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder> + getPatchDeploymentFieldBuilder() { + if (patchDeploymentBuilder_ == null) { + patchDeploymentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder>( + getPatchDeployment(), getParentForChildren(), isClean()); + patchDeployment_ = null; + } + return patchDeploymentBuilder_; + } + + @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.osconfig.v1.CreatePatchDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.CreatePatchDeploymentRequest) + private static final com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest(); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePatchDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreatePatchDeploymentRequest(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.osconfig.v1.PatchDeployments.CreatePatchDeploymentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GetPatchDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.GetPatchDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * A request message for retrieving a patch deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.GetPatchDeploymentRequest} + */ + public static final class GetPatchDeploymentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.GetPatchDeploymentRequest) + GetPatchDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPatchDeploymentRequest.newBuilder() to construct. + private GetPatchDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPatchDeploymentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPatchDeploymentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetPatchDeploymentRequest( + 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.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_GetPatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_GetPatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest.class, + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * 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) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * 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 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.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest other = + (com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest) 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.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest 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.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest 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.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest 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.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest + 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.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest 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.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest 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 request message for retrieving a patch deployment.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.GetPatchDeploymentRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.GetPatchDeploymentRequest) + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_GetPatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_GetPatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest.class, + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest.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.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_GetPatchDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest build() { + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest + buildPartial() { + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest result = + new com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest(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.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest other) { + if (other + == com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest + .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.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * 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.osconfig.v1.GetPatchDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.GetPatchDeploymentRequest) + private static final com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest(); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPatchDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetPatchDeploymentRequest(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.osconfig.v1.PatchDeployments.GetPatchDeploymentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchDeploymentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.ListPatchDeploymentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the parent in the form `projects/*`.
+     * 
+ * + * + * 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 parent in the form `projects/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+     * Optional. The maximum number of patch deployments to return. Default is 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to ListPatchDeployments
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to ListPatchDeployments
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + } + /** + * + * + *
+   * A request message for listing patch deployments.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchDeploymentsRequest} + */ + public static final class ListPatchDeploymentsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.ListPatchDeploymentsRequest) + ListPatchDeploymentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPatchDeploymentsRequest.newBuilder() to construct. + private ListPatchDeploymentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPatchDeploymentsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPatchDeploymentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPatchDeploymentsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest.class, + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+     * Required. The resource name of the parent in the form `projects/*`.
+     * 
+ * + * + * 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) { + 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 parent in the form `projects/*`.
+     * 
+ * + * + * 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 java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of patch deployments to return. Default is 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to ListPatchDeployments
+     * that indicates where this listing should continue from.
+     * 
+ * + * 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) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to ListPatchDeployments
+     * that indicates where this listing should continue from.
+     * 
+ * + * 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 java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest other = + (com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + 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.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + 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.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + 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.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + 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.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + 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.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest 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 request message for listing patch deployments.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchDeploymentsRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.ListPatchDeploymentsRequest) + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest.class, + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest build() { + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + buildPartial() { + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest result = + new com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest other) { + if (other + == com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+       * Required. The resource name of the parent in the form `projects/*`.
+       * 
+ * + * + * 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 parent in the form `projects/*`.
+       * 
+ * + * + * 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 parent in the form `projects/*`.
+       * 
+ * + * + * 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 parent in the form `projects/*`.
+       * 
+ * + * + * 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 parent in the form `projects/*`.
+       * 
+ * + * + * 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. The maximum number of patch deployments to return. Default is 100.
+       * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+       * Optional. The maximum number of patch deployments to return. Default is 100.
+       * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The maximum number of patch deployments to return. Default is 100.
+       * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+       * Optional. A pagination token returned from a previous call to ListPatchDeployments
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. A pagination token returned from a previous call to ListPatchDeployments
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. A pagination token returned from a previous call to ListPatchDeployments
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A pagination token returned from a previous call to ListPatchDeployments
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A pagination token returned from a previous call to ListPatchDeployments
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1.ListPatchDeploymentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.ListPatchDeploymentsRequest) + private static final com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest(); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPatchDeploymentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPatchDeploymentsRequest(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.osconfig.v1.PatchDeployments.ListPatchDeploymentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchDeploymentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.ListPatchDeploymentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + java.util.List + getPatchDeploymentsList(); + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment getPatchDeployments(int index); + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + int getPatchDeploymentsCount(); + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + java.util.List + getPatchDeploymentsOrBuilderList(); + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder + getPatchDeploymentsOrBuilder(int index); + + /** + * + * + *
+     * A pagination token that can be used to get the next page of patch
+     * deployments.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+     * A pagination token that can be used to get the next page of patch
+     * deployments.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + } + /** + * + * + *
+   * A response message for listing patch deployments.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchDeploymentsResponse} + */ + public static final class ListPatchDeploymentsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.ListPatchDeploymentsResponse) + ListPatchDeploymentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPatchDeploymentsResponse.newBuilder() to construct. + private ListPatchDeploymentsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPatchDeploymentsResponse() { + patchDeployments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPatchDeploymentsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPatchDeploymentsResponse( + 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)) { + patchDeployments_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment>(); + mutable_bitField0_ |= 0x00000001; + } + patchDeployments_.add( + input.readMessage( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + patchDeployments_ = java.util.Collections.unmodifiableList(patchDeployments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse.class, + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse.Builder + .class); + } + + public static final int PATCH_DEPLOYMENTS_FIELD_NUMBER = 1; + private java.util.List + patchDeployments_; + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public java.util.List + getPatchDeploymentsList() { + return patchDeployments_; + } + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder> + getPatchDeploymentsOrBuilderList() { + return patchDeployments_; + } + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public int getPatchDeploymentsCount() { + return patchDeployments_.size(); + } + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment getPatchDeployments( + int index) { + return patchDeployments_.get(index); + } + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder + getPatchDeploymentsOrBuilder(int index) { + return patchDeployments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+     * A pagination token that can be used to get the next page of patch
+     * deployments.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + 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 pagination token that can be used to get the next page of patch
+     * deployments.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < patchDeployments_.size(); i++) { + output.writeMessage(1, patchDeployments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < patchDeployments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, patchDeployments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse other = + (com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse) obj; + + if (!getPatchDeploymentsList().equals(other.getPatchDeploymentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPatchDeploymentsCount() > 0) { + hash = (37 * hash) + PATCH_DEPLOYMENTS_FIELD_NUMBER; + hash = (53 * hash) + getPatchDeploymentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + 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.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + 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.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + 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.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + 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.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + 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.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse 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 response message for listing patch deployments.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchDeploymentsResponse} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.ListPatchDeploymentsResponse) + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse.class, + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPatchDeploymentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (patchDeploymentsBuilder_ == null) { + patchDeployments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + patchDeploymentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse build() { + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + buildPartial() { + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse result = + new com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse(this); + int from_bitField0_ = bitField0_; + if (patchDeploymentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + patchDeployments_ = java.util.Collections.unmodifiableList(patchDeployments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.patchDeployments_ = patchDeployments_; + } else { + result.patchDeployments_ = patchDeploymentsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse) { + return mergeFrom( + (com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse other) { + if (other + == com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + .getDefaultInstance()) return this; + if (patchDeploymentsBuilder_ == null) { + if (!other.patchDeployments_.isEmpty()) { + if (patchDeployments_.isEmpty()) { + patchDeployments_ = other.patchDeployments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePatchDeploymentsIsMutable(); + patchDeployments_.addAll(other.patchDeployments_); + } + onChanged(); + } + } else { + if (!other.patchDeployments_.isEmpty()) { + if (patchDeploymentsBuilder_.isEmpty()) { + patchDeploymentsBuilder_.dispose(); + patchDeploymentsBuilder_ = null; + patchDeployments_ = other.patchDeployments_; + bitField0_ = (bitField0_ & ~0x00000001); + patchDeploymentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPatchDeploymentsFieldBuilder() + : null; + } else { + patchDeploymentsBuilder_.addAllMessages(other.patchDeployments_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + patchDeployments_ = java.util.Collections.emptyList(); + + private void ensurePatchDeploymentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + patchDeployments_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment>(patchDeployments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder> + patchDeploymentsBuilder_; + + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public java.util.List + getPatchDeploymentsList() { + if (patchDeploymentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(patchDeployments_); + } else { + return patchDeploymentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public int getPatchDeploymentsCount() { + if (patchDeploymentsBuilder_ == null) { + return patchDeployments_.size(); + } else { + return patchDeploymentsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment getPatchDeployments( + int index) { + if (patchDeploymentsBuilder_ == null) { + return patchDeployments_.get(index); + } else { + return patchDeploymentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public Builder setPatchDeployments( + int index, com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment value) { + if (patchDeploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePatchDeploymentsIsMutable(); + patchDeployments_.set(index, value); + onChanged(); + } else { + patchDeploymentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public Builder setPatchDeployments( + int index, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder builderForValue) { + if (patchDeploymentsBuilder_ == null) { + ensurePatchDeploymentsIsMutable(); + patchDeployments_.set(index, builderForValue.build()); + onChanged(); + } else { + patchDeploymentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public Builder addPatchDeployments( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment value) { + if (patchDeploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePatchDeploymentsIsMutable(); + patchDeployments_.add(value); + onChanged(); + } else { + patchDeploymentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public Builder addPatchDeployments( + int index, com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment value) { + if (patchDeploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePatchDeploymentsIsMutable(); + patchDeployments_.add(index, value); + onChanged(); + } else { + patchDeploymentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public Builder addPatchDeployments( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder builderForValue) { + if (patchDeploymentsBuilder_ == null) { + ensurePatchDeploymentsIsMutable(); + patchDeployments_.add(builderForValue.build()); + onChanged(); + } else { + patchDeploymentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public Builder addPatchDeployments( + int index, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder builderForValue) { + if (patchDeploymentsBuilder_ == null) { + ensurePatchDeploymentsIsMutable(); + patchDeployments_.add(index, builderForValue.build()); + onChanged(); + } else { + patchDeploymentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public Builder addAllPatchDeployments( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment> + values) { + if (patchDeploymentsBuilder_ == null) { + ensurePatchDeploymentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, patchDeployments_); + onChanged(); + } else { + patchDeploymentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public Builder clearPatchDeployments() { + if (patchDeploymentsBuilder_ == null) { + patchDeployments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + patchDeploymentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public Builder removePatchDeployments(int index) { + if (patchDeploymentsBuilder_ == null) { + ensurePatchDeploymentsIsMutable(); + patchDeployments_.remove(index); + onChanged(); + } else { + patchDeploymentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder + getPatchDeploymentsBuilder(int index) { + return getPatchDeploymentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder + getPatchDeploymentsOrBuilder(int index) { + if (patchDeploymentsBuilder_ == null) { + return patchDeployments_.get(index); + } else { + return patchDeploymentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder> + getPatchDeploymentsOrBuilderList() { + if (patchDeploymentsBuilder_ != null) { + return patchDeploymentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(patchDeployments_); + } + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder + addPatchDeploymentsBuilder() { + return getPatchDeploymentsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.getDefaultInstance()); + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder + addPatchDeploymentsBuilder(int index) { + return getPatchDeploymentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.getDefaultInstance()); + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + public java.util.List + getPatchDeploymentsBuilderList() { + return getPatchDeploymentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder> + getPatchDeploymentsFieldBuilder() { + if (patchDeploymentsBuilder_ == null) { + patchDeploymentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1.PatchDeployments.PatchDeploymentOrBuilder>( + patchDeployments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + patchDeployments_ = null; + } + return patchDeploymentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+       * A pagination token that can be used to get the next page of patch
+       * deployments.
+       * 
+ * + * 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 pagination token that can be used to get the next page of patch
+       * deployments.
+       * 
+ * + * 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 pagination token that can be used to get the next page of patch
+       * deployments.
+       * 
+ * + * 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 pagination token that can be used to get the next page of patch
+       * deployments.
+       * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+       * A pagination token that can be used to get the next page of patch
+       * deployments.
+       * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1.ListPatchDeploymentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.ListPatchDeploymentsResponse) + private static final com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse(); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPatchDeploymentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPatchDeploymentsResponse(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.osconfig.v1.PatchDeployments.ListPatchDeploymentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeletePatchDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.DeletePatchDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * A request message for deleting a patch deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.DeletePatchDeploymentRequest} + */ + public static final class DeletePatchDeploymentRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.DeletePatchDeploymentRequest) + DeletePatchDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeletePatchDeploymentRequest.newBuilder() to construct. + private DeletePatchDeploymentRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePatchDeploymentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePatchDeploymentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeletePatchDeploymentRequest( + 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.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_DeletePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_DeletePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest.class, + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * 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) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * 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 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.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest other = + (com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest) 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.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + 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.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + 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.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + 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.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + 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.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + 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.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest 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 request message for deleting a patch deployment.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.DeletePatchDeploymentRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.DeletePatchDeploymentRequest) + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_DeletePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_DeletePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest.class, + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest.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.osconfig.v1.PatchDeployments + .internal_static_google_cloud_osconfig_v1_DeletePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest build() { + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + buildPartial() { + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest result = + new com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest(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.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest other) { + if (other + == com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + .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.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * 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.osconfig.v1.DeletePatchDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.DeletePatchDeploymentRequest) + private static final com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest(); + } + + public static com.google.cloud.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePatchDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeletePatchDeploymentRequest(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.osconfig.v1.PatchDeployments.DeletePatchDeploymentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_PatchDeployment_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_PatchDeployment_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_OneTimeSchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_OneTimeSchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_RecurringSchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_RecurringSchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_WeeklySchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_WeeklySchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_MonthlySchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_MonthlySchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_WeekDayOfMonth_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_WeekDayOfMonth_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_CreatePatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_CreatePatchDeploymentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_GetPatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_GetPatchDeploymentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_DeletePatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_DeletePatchDeploymentRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/osconfig/v1/patch_deploym" + + "ents.proto\022\030google.cloud.osconfig.v1\032\037go" + + "ogle/api/field_behavior.proto\032\031google/ap" + + "i/resource.proto\032)google/cloud/osconfig/" + + "v1/patch_jobs.proto\032\036google/protobuf/dur" + + "ation.proto\032\037google/protobuf/timestamp.p" + + "roto\032\032google/type/datetime.proto\032\033google" + + "/type/dayofweek.proto\032\033google/type/timeo" + + "fday.proto\"\261\005\n\017PatchDeployment\022\014\n\004name\030\001" + + " \001(\t\022\030\n\013description\030\002 \001(\tB\003\340A\001\022K\n\017instan" + + "ce_filter\030\003 \001(\0132-.google.cloud.osconfig." + + "v1.PatchInstanceFilterB\003\340A\002\022@\n\014patch_con" + + "fig\030\004 \001(\0132%.google.cloud.osconfig.v1.Pat" + + "chConfigB\003\340A\001\0220\n\010duration\030\005 \001(\0132\031.google" + + ".protobuf.DurationB\003\340A\001\022K\n\021one_time_sche" + + "dule\030\006 \001(\0132).google.cloud.osconfig.v1.On" + + "eTimeScheduleB\003\340A\002H\000\022N\n\022recurring_schedu" + + "le\030\007 \001(\0132+.google.cloud.osconfig.v1.Recu" + + "rringScheduleB\003\340A\002H\000\0224\n\013create_time\030\010 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013up" + + "date_time\030\t \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\022:\n\021last_execute_time\030\n \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003:d\352Aa\n\'oscon" + + "fig.googleapis.com/PatchDeployment\0226proj" + + "ects/{project}/patchDeployments/{patch_d" + + "eployment}B\n\n\010schedule\"H\n\017OneTimeSchedul" + + "e\0225\n\014execute_time\030\001 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\002\"\373\004\n\021RecurringSchedule\022-" + + "\n\ttime_zone\030\001 \001(\0132\025.google.type.TimeZone" + + "B\003\340A\002\0223\n\nstart_time\030\002 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\001\0221\n\010end_time\030\003 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\003\340A\001\0220\n\013time_of" + + "_day\030\004 \001(\0132\026.google.type.TimeOfDayB\003\340A\002\022" + + "M\n\tfrequency\030\005 \001(\01625.google.cloud.osconf" + + "ig.v1.RecurringSchedule.FrequencyB\003\340A\002\022?" + + "\n\006weekly\030\006 \001(\0132(.google.cloud.osconfig.v" + + "1.WeeklyScheduleB\003\340A\002H\000\022A\n\007monthly\030\007 \001(\013" + + "2).google.cloud.osconfig.v1.MonthlySched" + + "uleB\003\340A\002H\000\022:\n\021last_execute_time\030\t \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\022:\n\021next_e" + + "xecute_time\030\n \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\"?\n\tFrequency\022\031\n\025FREQUENCY_UNS" + + "PECIFIED\020\000\022\n\n\006WEEKLY\020\001\022\013\n\007MONTHLY\020\002B\021\n\017s" + + "chedule_config\"B\n\016WeeklySchedule\0220\n\013day_" + + "of_week\030\001 \001(\0162\026.google.type.DayOfWeekB\003\340" + + "A\002\"\207\001\n\017MonthlySchedule\022J\n\021week_day_of_mo" + + "nth\030\001 \001(\0132(.google.cloud.osconfig.v1.Wee" + + "kDayOfMonthB\003\340A\002H\000\022\030\n\tmonth_day\030\002 \001(\005B\003\340" + + "A\002H\000B\016\n\014day_of_month\"]\n\016WeekDayOfMonth\022\031" + + "\n\014week_ordinal\030\001 \001(\005B\003\340A\002\0220\n\013day_of_week" + + "\030\002 \001(\0162\026.google.type.DayOfWeekB\003\340A\002\"\317\001\n\034" + + "CreatePatchDeploymentRequest\022C\n\006parent\030\001" + + " \001(\tB3\340A\002\372A-\n+cloudresourcemanager.googl" + + "eapis.com/Project\022 \n\023patch_deployment_id" + + "\030\002 \001(\tB\003\340A\002\022H\n\020patch_deployment\030\003 \001(\0132)." + + "google.cloud.osconfig.v1.PatchDeployment" + + "B\003\340A\002\"Z\n\031GetPatchDeploymentRequest\022=\n\004na" + + "me\030\001 \001(\tB/\340A\002\372A)\n\'osconfig.googleapis.co" + + "m/PatchDeployment\"\223\001\n\033ListPatchDeploymen" + + "tsRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloud" + + "resourcemanager.googleapis.com/Project\022\026" + + "\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001" + + "(\tB\003\340A\001\"}\n\034ListPatchDeploymentsResponse\022" + + "D\n\021patch_deployments\030\001 \003(\0132).google.clou" + + "d.osconfig.v1.PatchDeployment\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t\"]\n\034DeletePatchDeploymentR" + + "equest\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'osconfig.g" + + "oogleapis.com/PatchDeploymentB\306\001\n\034com.go" + + "ogle.cloud.osconfig.v1B\020PatchDeployments" + + "Z@google.golang.org/genproto/googleapis/" + + "cloud/osconfig/v1;osconfig\252\002\030Google.Clou" + + "d.OsConfig.V1\312\002\030Google\\Cloud\\OsConfig\\V1" + + "\352\002\033Google::Cloud::OsConfig::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.osconfig.v1.PatchJobs.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.DateTimeProto.getDescriptor(), + com.google.type.DayOfWeekProto.getDescriptor(), + com.google.type.TimeOfDayProto.getDescriptor(), + }); + internal_static_google_cloud_osconfig_v1_PatchDeployment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1_PatchDeployment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_PatchDeployment_descriptor, + new java.lang.String[] { + "Name", + "Description", + "InstanceFilter", + "PatchConfig", + "Duration", + "OneTimeSchedule", + "RecurringSchedule", + "CreateTime", + "UpdateTime", + "LastExecuteTime", + "Schedule", + }); + internal_static_google_cloud_osconfig_v1_OneTimeSchedule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1_OneTimeSchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_OneTimeSchedule_descriptor, + new java.lang.String[] { + "ExecuteTime", + }); + internal_static_google_cloud_osconfig_v1_RecurringSchedule_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_osconfig_v1_RecurringSchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_RecurringSchedule_descriptor, + new java.lang.String[] { + "TimeZone", + "StartTime", + "EndTime", + "TimeOfDay", + "Frequency", + "Weekly", + "Monthly", + "LastExecuteTime", + "NextExecuteTime", + "ScheduleConfig", + }); + internal_static_google_cloud_osconfig_v1_WeeklySchedule_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_osconfig_v1_WeeklySchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_WeeklySchedule_descriptor, + new java.lang.String[] { + "DayOfWeek", + }); + internal_static_google_cloud_osconfig_v1_MonthlySchedule_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_osconfig_v1_MonthlySchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_MonthlySchedule_descriptor, + new java.lang.String[] { + "WeekDayOfMonth", "MonthDay", "DayOfMonth", + }); + internal_static_google_cloud_osconfig_v1_WeekDayOfMonth_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_osconfig_v1_WeekDayOfMonth_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_WeekDayOfMonth_descriptor, + new java.lang.String[] { + "WeekOrdinal", "DayOfWeek", + }); + internal_static_google_cloud_osconfig_v1_CreatePatchDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_osconfig_v1_CreatePatchDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_CreatePatchDeploymentRequest_descriptor, + new java.lang.String[] { + "Parent", "PatchDeploymentId", "PatchDeployment", + }); + internal_static_google_cloud_osconfig_v1_GetPatchDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_osconfig_v1_GetPatchDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_GetPatchDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_ListPatchDeploymentsResponse_descriptor, + new java.lang.String[] { + "PatchDeployments", "NextPageToken", + }); + internal_static_google_cloud_osconfig_v1_DeletePatchDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_osconfig_v1_DeletePatchDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_DeletePatchDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.osconfig.v1.PatchJobs.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.DateTimeProto.getDescriptor(); + com.google.type.DayOfWeekProto.getDescriptor(); + com.google.type.TimeOfDayProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/PatchJobs.java b/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/PatchJobs.java new file mode 100644 index 00000000..21642e89 --- /dev/null +++ b/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/PatchJobs.java @@ -0,0 +1,34794 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1/patch_jobs.proto + +package com.google.cloud.osconfig.v1; + +public final class PatchJobs { + private PatchJobs() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public interface ExecutePatchJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.ExecutePatchJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The project in which to run this patch in the form `projects/*`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+     * Required. The project in which to run this patch in the form `projects/*`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+     * Description of the patch job. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * Description of the patch job. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Required. Instances to patch, either explicitly or filtered by some criteria such
+     * as zone or labels.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instanceFilter field is set. + */ + boolean hasInstanceFilter(); + /** + * + * + *
+     * Required. Instances to patch, either explicitly or filtered by some criteria such
+     * as zone or labels.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter getInstanceFilter(); + /** + * + * + *
+     * Required. Instances to patch, either explicitly or filtered by some criteria such
+     * as zone or labels.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder(); + + /** + * + * + *
+     * Patch configuration being applied. If omitted, instances are
+     * patched using the default configurations.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + * + * @return Whether the patchConfig field is set. + */ + boolean hasPatchConfig(); + /** + * + * + *
+     * Patch configuration being applied. If omitted, instances are
+     * patched using the default configurations.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + * + * @return The patchConfig. + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig getPatchConfig(); + /** + * + * + *
+     * Patch configuration being applied. If omitted, instances are
+     * patched using the default configurations.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder getPatchConfigOrBuilder(); + + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the patch job
+     * times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return Whether the duration field is set. + */ + boolean hasDuration(); + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the patch job
+     * times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return The duration. + */ + com.google.protobuf.Duration getDuration(); + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the patch job
+     * times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + */ + com.google.protobuf.DurationOrBuilder getDurationOrBuilder(); + + /** + * + * + *
+     * If this patch is a dry-run only, instances are contacted but
+     * will do nothing.
+     * 
+ * + * bool dry_run = 6; + * + * @return The dryRun. + */ + boolean getDryRun(); + + /** + * + * + *
+     * Display name for this patch job. This does not have to be unique.
+     * 
+ * + * string display_name = 8; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+     * Display name for this patch job. This does not have to be unique.
+     * 
+ * + * string display_name = 8; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + } + /** + * + * + *
+   * A request message to initiate patching across Google Compute Engine
+   * instances.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ExecutePatchJobRequest} + */ + public static final class ExecutePatchJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.ExecutePatchJobRequest) + ExecutePatchJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecutePatchJobRequest.newBuilder() to construct. + private ExecutePatchJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecutePatchJobRequest() { + parent_ = ""; + description_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecutePatchJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExecutePatchJobRequest( + 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(); + + description_ = s; + break; + } + case 34: + { + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder subBuilder = null; + if (patchConfig_ != null) { + subBuilder = patchConfig_.toBuilder(); + } + patchConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(patchConfig_); + patchConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (duration_ != null) { + subBuilder = duration_.toBuilder(); + } + duration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(duration_); + duration_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + dryRun_ = input.readBool(); + break; + } + case 58: + { + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder subBuilder = + null; + if (instanceFilter_ != null) { + subBuilder = instanceFilter_.toBuilder(); + } + instanceFilter_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instanceFilter_); + instanceFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecutePatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecutePatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest.class, + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+     * Required. The project in which to run this patch in the form `projects/*`
+     * 
+ * + * + * 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) { + 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 project in which to run this patch in the form `projects/*`
+     * 
+ * + * + * 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 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 DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * Description of the patch job. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * Description of the patch job. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + 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 INSTANCE_FILTER_FIELD_NUMBER = 7; + private com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter instanceFilter_; + /** + * + * + *
+     * Required. Instances to patch, either explicitly or filtered by some criteria such
+     * as zone or labels.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instanceFilter field is set. + */ + public boolean hasInstanceFilter() { + return instanceFilter_ != null; + } + /** + * + * + *
+     * Required. Instances to patch, either explicitly or filtered by some criteria such
+     * as zone or labels.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter getInstanceFilter() { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + /** + * + * + *
+     * Required. Instances to patch, either explicitly or filtered by some criteria such
+     * as zone or labels.
+     * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + return getInstanceFilter(); + } + + public static final int PATCH_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.osconfig.v1.PatchJobs.PatchConfig patchConfig_; + /** + * + * + *
+     * Patch configuration being applied. If omitted, instances are
+     * patched using the default configurations.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + * + * @return Whether the patchConfig field is set. + */ + public boolean hasPatchConfig() { + return patchConfig_ != null; + } + /** + * + * + *
+     * Patch configuration being applied. If omitted, instances are
+     * patched using the default configurations.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + * + * @return The patchConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig getPatchConfig() { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + /** + * + * + *
+     * Patch configuration being applied. If omitted, instances are
+     * patched using the default configurations.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder getPatchConfigOrBuilder() { + return getPatchConfig(); + } + + public static final int DURATION_FIELD_NUMBER = 5; + private com.google.protobuf.Duration duration_; + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the patch job
+     * times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return Whether the duration field is set. + */ + public boolean hasDuration() { + return duration_ != null; + } + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the patch job
+     * times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return The duration. + */ + public com.google.protobuf.Duration getDuration() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the patch job
+     * times out.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + return getDuration(); + } + + public static final int DRY_RUN_FIELD_NUMBER = 6; + private boolean dryRun_; + /** + * + * + *
+     * If this patch is a dry-run only, instances are contacted but
+     * will do nothing.
+     * 
+ * + * bool dry_run = 6; + * + * @return The dryRun. + */ + public boolean getDryRun() { + return dryRun_; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 8; + private volatile java.lang.Object displayName_; + /** + * + * + *
+     * Display name for this patch job. This does not have to be unique.
+     * 
+ * + * string display_name = 8; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+     * Display name for this patch job. This does not have to be unique.
+     * 
+ * + * string display_name = 8; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (patchConfig_ != null) { + output.writeMessage(4, getPatchConfig()); + } + if (duration_ != null) { + output.writeMessage(5, getDuration()); + } + if (dryRun_ != false) { + output.writeBool(6, dryRun_); + } + if (instanceFilter_ != null) { + output.writeMessage(7, getInstanceFilter()); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, displayName_); + } + 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 (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (patchConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPatchConfig()); + } + if (duration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDuration()); + } + if (dryRun_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, dryRun_); + } + if (instanceFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getInstanceFilter()); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, displayName_); + } + 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.osconfig.v1.PatchJobs.ExecutePatchJobRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest other = + (com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasInstanceFilter() != other.hasInstanceFilter()) return false; + if (hasInstanceFilter()) { + if (!getInstanceFilter().equals(other.getInstanceFilter())) return false; + } + if (hasPatchConfig() != other.hasPatchConfig()) return false; + if (hasPatchConfig()) { + if (!getPatchConfig().equals(other.getPatchConfig())) return false; + } + if (hasDuration() != other.hasDuration()) return false; + if (hasDuration()) { + if (!getDuration().equals(other.getDuration())) return false; + } + if (getDryRun() != other.getDryRun()) return false; + if (!getDisplayName().equals(other.getDisplayName())) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasInstanceFilter()) { + hash = (37 * hash) + INSTANCE_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getInstanceFilter().hashCode(); + } + if (hasPatchConfig()) { + hash = (37 * hash) + PATCH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPatchConfig().hashCode(); + } + if (hasDuration()) { + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration().hashCode(); + } + hash = (37 * hash) + DRY_RUN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDryRun()); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest 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.osconfig.v1.PatchJobs.ExecutePatchJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest 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.osconfig.v1.PatchJobs.ExecutePatchJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest 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.osconfig.v1.PatchJobs.ExecutePatchJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest 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.osconfig.v1.PatchJobs.ExecutePatchJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest 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.osconfig.v1.PatchJobs.ExecutePatchJobRequest 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 request message to initiate patching across Google Compute Engine
+     * instances.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ExecutePatchJobRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.ExecutePatchJobRequest) + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecutePatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecutePatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest.class, + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest.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_ = ""; + + description_ = ""; + + if (instanceFilterBuilder_ == null) { + instanceFilter_ = null; + } else { + instanceFilter_ = null; + instanceFilterBuilder_ = null; + } + if (patchConfigBuilder_ == null) { + patchConfig_ = null; + } else { + patchConfig_ = null; + patchConfigBuilder_ = null; + } + if (durationBuilder_ == null) { + duration_ = null; + } else { + duration_ = null; + durationBuilder_ = null; + } + dryRun_ = false; + + displayName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecutePatchJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest build() { + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest result = + new com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest(this); + result.parent_ = parent_; + result.description_ = description_; + if (instanceFilterBuilder_ == null) { + result.instanceFilter_ = instanceFilter_; + } else { + result.instanceFilter_ = instanceFilterBuilder_.build(); + } + if (patchConfigBuilder_ == null) { + result.patchConfig_ = patchConfig_; + } else { + result.patchConfig_ = patchConfigBuilder_.build(); + } + if (durationBuilder_ == null) { + result.duration_ = duration_; + } else { + result.duration_ = durationBuilder_.build(); + } + result.dryRun_ = dryRun_; + result.displayName_ = displayName_; + 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.osconfig.v1.PatchJobs.ExecutePatchJobRequest) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest other) { + if (other + == com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasInstanceFilter()) { + mergeInstanceFilter(other.getInstanceFilter()); + } + if (other.hasPatchConfig()) { + mergePatchConfig(other.getPatchConfig()); + } + if (other.hasDuration()) { + mergeDuration(other.getDuration()); + } + if (other.getDryRun() != false) { + setDryRun(other.getDryRun()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + 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.osconfig.v1.PatchJobs.ExecutePatchJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+       * Required. The project in which to run this patch in the form `projects/*`
+       * 
+ * + * + * 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 project in which to run this patch in the form `projects/*`
+       * 
+ * + * + * 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 project in which to run this patch in the form `projects/*`
+       * 
+ * + * + * 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 project in which to run this patch in the form `projects/*`
+       * 
+ * + * + * 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 project in which to run this patch in the form `projects/*`
+       * 
+ * + * + * 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 description_ = ""; + /** + * + * + *
+       * Description of the patch job. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Description of the patch job. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Description of the patch job. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Description of the patch job. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * Description of the patch job. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter instanceFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder> + instanceFilterBuilder_; + /** + * + * + *
+       * Required. Instances to patch, either explicitly or filtered by some criteria such
+       * as zone or labels.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instanceFilter field is set. + */ + public boolean hasInstanceFilter() { + return instanceFilterBuilder_ != null || instanceFilter_ != null; + } + /** + * + * + *
+       * Required. Instances to patch, either explicitly or filtered by some criteria such
+       * as zone or labels.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter getInstanceFilter() { + if (instanceFilterBuilder_ == null) { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } else { + return instanceFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Instances to patch, either explicitly or filtered by some criteria such
+       * as zone or labels.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter value) { + if (instanceFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceFilter_ = value; + onChanged(); + } else { + instanceFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. Instances to patch, either explicitly or filtered by some criteria such
+       * as zone or labels.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder builderForValue) { + if (instanceFilterBuilder_ == null) { + instanceFilter_ = builderForValue.build(); + onChanged(); + } else { + instanceFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. Instances to patch, either explicitly or filtered by some criteria such
+       * as zone or labels.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInstanceFilter( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter value) { + if (instanceFilterBuilder_ == null) { + if (instanceFilter_ != null) { + instanceFilter_ = + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.newBuilder( + instanceFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + instanceFilter_ = value; + } + onChanged(); + } else { + instanceFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. Instances to patch, either explicitly or filtered by some criteria such
+       * as zone or labels.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstanceFilter() { + if (instanceFilterBuilder_ == null) { + instanceFilter_ = null; + onChanged(); + } else { + instanceFilter_ = null; + instanceFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. Instances to patch, either explicitly or filtered by some criteria such
+       * as zone or labels.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder + getInstanceFilterBuilder() { + + onChanged(); + return getInstanceFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Instances to patch, either explicitly or filtered by some criteria such
+       * as zone or labels.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + if (instanceFilterBuilder_ != null) { + return instanceFilterBuilder_.getMessageOrBuilder(); + } else { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + } + /** + * + * + *
+       * Required. Instances to patch, either explicitly or filtered by some criteria such
+       * as zone or labels.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder> + getInstanceFilterFieldBuilder() { + if (instanceFilterBuilder_ == null) { + instanceFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder>( + getInstanceFilter(), getParentForChildren(), isClean()); + instanceFilter_ = null; + } + return instanceFilterBuilder_; + } + + private com.google.cloud.osconfig.v1.PatchJobs.PatchConfig patchConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder> + patchConfigBuilder_; + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + * + * @return Whether the patchConfig field is set. + */ + public boolean hasPatchConfig() { + return patchConfigBuilder_ != null || patchConfig_ != null; + } + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + * + * @return The patchConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig getPatchConfig() { + if (patchConfigBuilder_ == null) { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } else { + return patchConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + */ + public Builder setPatchConfig(com.google.cloud.osconfig.v1.PatchJobs.PatchConfig value) { + if (patchConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + patchConfig_ = value; + onChanged(); + } else { + patchConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + */ + public Builder setPatchConfig( + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder builderForValue) { + if (patchConfigBuilder_ == null) { + patchConfig_ = builderForValue.build(); + onChanged(); + } else { + patchConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + */ + public Builder mergePatchConfig(com.google.cloud.osconfig.v1.PatchJobs.PatchConfig value) { + if (patchConfigBuilder_ == null) { + if (patchConfig_ != null) { + patchConfig_ = + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.newBuilder(patchConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + patchConfig_ = value; + } + onChanged(); + } else { + patchConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + */ + public Builder clearPatchConfig() { + if (patchConfigBuilder_ == null) { + patchConfig_ = null; + onChanged(); + } else { + patchConfig_ = null; + patchConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder getPatchConfigBuilder() { + + onChanged(); + return getPatchConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder getPatchConfigOrBuilder() { + if (patchConfigBuilder_ != null) { + return patchConfigBuilder_.getMessageOrBuilder(); + } else { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + } + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder> + getPatchConfigFieldBuilder() { + if (patchConfigBuilder_ == null) { + patchConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder>( + getPatchConfig(), getParentForChildren(), isClean()); + patchConfig_ = null; + } + return patchConfigBuilder_; + } + + private com.google.protobuf.Duration duration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + durationBuilder_; + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the patch job
+       * times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return Whether the duration field is set. + */ + public boolean hasDuration() { + return durationBuilder_ != null || duration_ != null; + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the patch job
+       * times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return The duration. + */ + public com.google.protobuf.Duration getDuration() { + if (durationBuilder_ == null) { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } else { + return durationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the patch job
+       * times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public Builder setDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + duration_ = value; + onChanged(); + } else { + durationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the patch job
+       * times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (durationBuilder_ == null) { + duration_ = builderForValue.build(); + onChanged(); + } else { + durationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the patch job
+       * times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public Builder mergeDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (duration_ != null) { + duration_ = + com.google.protobuf.Duration.newBuilder(duration_).mergeFrom(value).buildPartial(); + } else { + duration_ = value; + } + onChanged(); + } else { + durationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the patch job
+       * times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public Builder clearDuration() { + if (durationBuilder_ == null) { + duration_ = null; + onChanged(); + } else { + duration_ = null; + durationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the patch job
+       * times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public com.google.protobuf.Duration.Builder getDurationBuilder() { + + onChanged(); + return getDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the patch job
+       * times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + if (durationBuilder_ != null) { + return durationBuilder_.getMessageOrBuilder(); + } else { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the patch job
+       * times out.
+       * 
+ * + * .google.protobuf.Duration duration = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDurationFieldBuilder() { + if (durationBuilder_ == null) { + durationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDuration(), getParentForChildren(), isClean()); + duration_ = null; + } + return durationBuilder_; + } + + private boolean dryRun_; + /** + * + * + *
+       * If this patch is a dry-run only, instances are contacted but
+       * will do nothing.
+       * 
+ * + * bool dry_run = 6; + * + * @return The dryRun. + */ + public boolean getDryRun() { + return dryRun_; + } + /** + * + * + *
+       * If this patch is a dry-run only, instances are contacted but
+       * will do nothing.
+       * 
+ * + * bool dry_run = 6; + * + * @param value The dryRun to set. + * @return This builder for chaining. + */ + public Builder setDryRun(boolean value) { + + dryRun_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If this patch is a dry-run only, instances are contacted but
+       * will do nothing.
+       * 
+ * + * bool dry_run = 6; + * + * @return This builder for chaining. + */ + public Builder clearDryRun() { + + dryRun_ = false; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+       * Display name for this patch job. This does not have to be unique.
+       * 
+ * + * string display_name = 8; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Display name for this patch job. This does not have to be unique.
+       * 
+ * + * string display_name = 8; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Display name for this patch job. This does not have to be unique.
+       * 
+ * + * string display_name = 8; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Display name for this patch job. This does not have to be unique.
+       * 
+ * + * string display_name = 8; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Display name for this patch job. This does not have to be unique.
+       * 
+ * + * string display_name = 8; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + @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.osconfig.v1.ExecutePatchJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.ExecutePatchJobRequest) + private static final com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecutePatchJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecutePatchJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecutePatchJobRequest(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.osconfig.v1.PatchJobs.ExecutePatchJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GetPatchJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.GetPatchJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Request to get an active or completed patch job.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.GetPatchJobRequest} + */ + public static final class GetPatchJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.GetPatchJobRequest) + GetPatchJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPatchJobRequest.newBuilder() to construct. + private GetPatchJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPatchJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPatchJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetPatchJobRequest( + 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GetPatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GetPatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest.class, + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * + * 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) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * + * 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 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.osconfig.v1.PatchJobs.GetPatchJobRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest other = + (com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest) 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.osconfig.v1.PatchJobs.GetPatchJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest 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.osconfig.v1.PatchJobs.GetPatchJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest 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.osconfig.v1.PatchJobs.GetPatchJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest 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.osconfig.v1.PatchJobs.GetPatchJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest 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.osconfig.v1.PatchJobs.GetPatchJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest 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.osconfig.v1.PatchJobs.GetPatchJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request to get an active or completed patch job.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.GetPatchJobRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.GetPatchJobRequest) + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GetPatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GetPatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest.class, + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest.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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GetPatchJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest build() { + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest result = + new com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest(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.osconfig.v1.PatchJobs.GetPatchJobRequest) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest other) { + if (other == com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest.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.osconfig.v1.PatchJobs.GetPatchJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. Name of the patch in the form `projects/*/patchJobs/*`
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Name of the patch in the form `projects/*/patchJobs/*`
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Name of the patch in the form `projects/*/patchJobs/*`
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Name of the patch in the form `projects/*/patchJobs/*`
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Name of the patch in the form `projects/*/patchJobs/*`
+       * 
+ * + * + * 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.osconfig.v1.GetPatchJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.GetPatchJobRequest) + private static final com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GetPatchJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPatchJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetPatchJobRequest(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.osconfig.v1.PatchJobs.GetPatchJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchJobInstanceDetailsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The parent for the instances are in the form of `projects/*/patchJobs/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+     * Required. The parent for the instances are in the form of `projects/*/patchJobs/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+     * The maximum number of instance details records to return.  Default is 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+     * A filter expression that filters results listed in the response. This
+     * field supports filtering results by instance zone, name, state, or
+     * `failure_reason`.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+     * A filter expression that filters results listed in the response. This
+     * field supports filtering results by instance zone, name, state, or
+     * `failure_reason`.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + } + /** + * + * + *
+   * Request to list details for all instances that are part of a patch job.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} + */ + public static final class ListPatchJobInstanceDetailsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest) + ListPatchJobInstanceDetailsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPatchJobInstanceDetailsRequest.newBuilder() to construct. + private ListPatchJobInstanceDetailsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPatchJobInstanceDetailsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPatchJobInstanceDetailsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPatchJobInstanceDetailsRequest( + 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; + } + 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest.class, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+     * Required. The parent for the instances are in the form of `projects/*/patchJobs/*`.
+     * 
+ * + * + * 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) { + 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 parent for the instances are in the form of `projects/*/patchJobs/*`.
+     * 
+ * + * + * 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 java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+     * The maximum number of instance details records to return.  Default is 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + 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_; + /** + * + * + *
+     * A filter expression that filters results listed in the response. This
+     * field supports filtering results by instance zone, name, state, or
+     * `failure_reason`.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + 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; + } + } + /** + * + * + *
+     * A filter expression that filters results listed in the response. This
+     * field supports filtering results by instance zone, name, state, or
+     * `failure_reason`.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!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_); + } + 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_); + } + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest other = + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest) 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 (!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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request to list details for all instances that are part of a patch job.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest) + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest.class, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest build() { + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest result = + new com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest other) { + if (other + == com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + .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(); + } + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+       * Required. The parent for the instances are in the form of `projects/*/patchJobs/*`.
+       * 
+ * + * + * 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 parent for the instances are in the form of `projects/*/patchJobs/*`.
+       * 
+ * + * + * 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 parent for the instances are in the form of `projects/*/patchJobs/*`.
+       * 
+ * + * + * 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 parent for the instances are in the form of `projects/*/patchJobs/*`.
+       * 
+ * + * + * 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 parent for the instances are in the form of `projects/*/patchJobs/*`.
+       * 
+ * + * + * 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_; + /** + * + * + *
+       * The maximum number of instance details records to return.  Default is 100.
+       * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+       * The maximum number of instance details records to return.  Default is 100.
+       * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum number of instance details records to return.  Default is 100.
+       * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+       * A pagination token returned from a previous call
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A pagination token returned from a previous call
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A pagination token returned from a previous call
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A pagination token returned from a previous call
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+       * A pagination token returned from a previous call
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+       * A filter expression that filters results listed in the response. This
+       * field supports filtering results by instance zone, name, state, or
+       * `failure_reason`.
+       * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A filter expression that filters results listed in the response. This
+       * field supports filtering results by instance zone, name, state, or
+       * `failure_reason`.
+       * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A filter expression that filters results listed in the response. This
+       * field supports filtering results by instance zone, name, state, or
+       * `failure_reason`.
+       * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A filter expression that filters results listed in the response. This
+       * field supports filtering results by instance zone, name, state, or
+       * `failure_reason`.
+       * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+       * A filter expression that filters results listed in the response. This
+       * field supports filtering results by instance zone, name, state, or
+       * `failure_reason`.
+       * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + @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.osconfig.v1.ListPatchJobInstanceDetailsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest) + private static final com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPatchJobInstanceDetailsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPatchJobInstanceDetailsRequest(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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchJobInstanceDetailsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + java.util.List + getPatchJobInstanceDetailsList(); + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails getPatchJobInstanceDetails( + int index); + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + int getPatchJobInstanceDetailsCount(); + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + java.util.List< + ? extends com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetailsOrBuilder> + getPatchJobInstanceDetailsOrBuilderList(); + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetailsOrBuilder + getPatchJobInstanceDetailsOrBuilder(int index); + + /** + * + * + *
+     * A pagination token that can be used to get the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+     * A pagination token that can be used to get the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + } + /** + * + * + *
+   * A response message for listing the instances details for a patch job.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} + */ + public static final class ListPatchJobInstanceDetailsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) + ListPatchJobInstanceDetailsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPatchJobInstanceDetailsResponse.newBuilder() to construct. + private ListPatchJobInstanceDetailsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPatchJobInstanceDetailsResponse() { + patchJobInstanceDetails_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPatchJobInstanceDetailsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPatchJobInstanceDetailsResponse( + 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)) { + patchJobInstanceDetails_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails>(); + mutable_bitField0_ |= 0x00000001; + } + patchJobInstanceDetails_.add( + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + patchJobInstanceDetails_ = + java.util.Collections.unmodifiableList(patchJobInstanceDetails_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse.class, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse.Builder + .class); + } + + public static final int PATCH_JOB_INSTANCE_DETAILS_FIELD_NUMBER = 1; + private java.util.List + patchJobInstanceDetails_; + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public java.util.List + getPatchJobInstanceDetailsList() { + return patchJobInstanceDetails_; + } + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetailsOrBuilder> + getPatchJobInstanceDetailsOrBuilderList() { + return patchJobInstanceDetails_; + } + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public int getPatchJobInstanceDetailsCount() { + return patchJobInstanceDetails_.size(); + } + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails + getPatchJobInstanceDetails(int index) { + return patchJobInstanceDetails_.get(index); + } + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetailsOrBuilder + getPatchJobInstanceDetailsOrBuilder(int index) { + return patchJobInstanceDetails_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+     * A pagination token that can be used to get 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) { + 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 pagination token that can be used to get 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 java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < patchJobInstanceDetails_.size(); i++) { + output.writeMessage(1, patchJobInstanceDetails_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < patchJobInstanceDetails_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, patchJobInstanceDetails_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse other = + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse) obj; + + if (!getPatchJobInstanceDetailsList().equals(other.getPatchJobInstanceDetailsList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPatchJobInstanceDetailsCount() > 0) { + hash = (37 * hash) + PATCH_JOB_INSTANCE_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getPatchJobInstanceDetailsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + 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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse 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 response message for listing the instances details for a patch job.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse.class, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPatchJobInstanceDetailsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (patchJobInstanceDetailsBuilder_ == null) { + patchJobInstanceDetails_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + patchJobInstanceDetailsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse build() { + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse result = + new com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse(this); + int from_bitField0_ = bitField0_; + if (patchJobInstanceDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + patchJobInstanceDetails_ = + java.util.Collections.unmodifiableList(patchJobInstanceDetails_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.patchJobInstanceDetails_ = patchJobInstanceDetails_; + } else { + result.patchJobInstanceDetails_ = patchJobInstanceDetailsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse) { + return mergeFrom( + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse other) { + if (other + == com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + .getDefaultInstance()) return this; + if (patchJobInstanceDetailsBuilder_ == null) { + if (!other.patchJobInstanceDetails_.isEmpty()) { + if (patchJobInstanceDetails_.isEmpty()) { + patchJobInstanceDetails_ = other.patchJobInstanceDetails_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePatchJobInstanceDetailsIsMutable(); + patchJobInstanceDetails_.addAll(other.patchJobInstanceDetails_); + } + onChanged(); + } + } else { + if (!other.patchJobInstanceDetails_.isEmpty()) { + if (patchJobInstanceDetailsBuilder_.isEmpty()) { + patchJobInstanceDetailsBuilder_.dispose(); + patchJobInstanceDetailsBuilder_ = null; + patchJobInstanceDetails_ = other.patchJobInstanceDetails_; + bitField0_ = (bitField0_ & ~0x00000001); + patchJobInstanceDetailsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPatchJobInstanceDetailsFieldBuilder() + : null; + } else { + patchJobInstanceDetailsBuilder_.addAllMessages(other.patchJobInstanceDetails_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + patchJobInstanceDetails_ = java.util.Collections.emptyList(); + + private void ensurePatchJobInstanceDetailsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + patchJobInstanceDetails_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails>( + patchJobInstanceDetails_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetailsOrBuilder> + patchJobInstanceDetailsBuilder_; + + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public java.util.List + getPatchJobInstanceDetailsList() { + if (patchJobInstanceDetailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(patchJobInstanceDetails_); + } else { + return patchJobInstanceDetailsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public int getPatchJobInstanceDetailsCount() { + if (patchJobInstanceDetailsBuilder_ == null) { + return patchJobInstanceDetails_.size(); + } else { + return patchJobInstanceDetailsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails + getPatchJobInstanceDetails(int index) { + if (patchJobInstanceDetailsBuilder_ == null) { + return patchJobInstanceDetails_.get(index); + } else { + return patchJobInstanceDetailsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder setPatchJobInstanceDetails( + int index, com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails value) { + if (patchJobInstanceDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePatchJobInstanceDetailsIsMutable(); + patchJobInstanceDetails_.set(index, value); + onChanged(); + } else { + patchJobInstanceDetailsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder setPatchJobInstanceDetails( + int index, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.Builder builderForValue) { + if (patchJobInstanceDetailsBuilder_ == null) { + ensurePatchJobInstanceDetailsIsMutable(); + patchJobInstanceDetails_.set(index, builderForValue.build()); + onChanged(); + } else { + patchJobInstanceDetailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder addPatchJobInstanceDetails( + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails value) { + if (patchJobInstanceDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePatchJobInstanceDetailsIsMutable(); + patchJobInstanceDetails_.add(value); + onChanged(); + } else { + patchJobInstanceDetailsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder addPatchJobInstanceDetails( + int index, com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails value) { + if (patchJobInstanceDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePatchJobInstanceDetailsIsMutable(); + patchJobInstanceDetails_.add(index, value); + onChanged(); + } else { + patchJobInstanceDetailsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder addPatchJobInstanceDetails( + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.Builder builderForValue) { + if (patchJobInstanceDetailsBuilder_ == null) { + ensurePatchJobInstanceDetailsIsMutable(); + patchJobInstanceDetails_.add(builderForValue.build()); + onChanged(); + } else { + patchJobInstanceDetailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder addPatchJobInstanceDetails( + int index, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.Builder builderForValue) { + if (patchJobInstanceDetailsBuilder_ == null) { + ensurePatchJobInstanceDetailsIsMutable(); + patchJobInstanceDetails_.add(index, builderForValue.build()); + onChanged(); + } else { + patchJobInstanceDetailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder addAllPatchJobInstanceDetails( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails> + values) { + if (patchJobInstanceDetailsBuilder_ == null) { + ensurePatchJobInstanceDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, patchJobInstanceDetails_); + onChanged(); + } else { + patchJobInstanceDetailsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder clearPatchJobInstanceDetails() { + if (patchJobInstanceDetailsBuilder_ == null) { + patchJobInstanceDetails_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + patchJobInstanceDetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder removePatchJobInstanceDetails(int index) { + if (patchJobInstanceDetailsBuilder_ == null) { + ensurePatchJobInstanceDetailsIsMutable(); + patchJobInstanceDetails_.remove(index); + onChanged(); + } else { + patchJobInstanceDetailsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.Builder + getPatchJobInstanceDetailsBuilder(int index) { + return getPatchJobInstanceDetailsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetailsOrBuilder + getPatchJobInstanceDetailsOrBuilder(int index) { + if (patchJobInstanceDetailsBuilder_ == null) { + return patchJobInstanceDetails_.get(index); + } else { + return patchJobInstanceDetailsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetailsOrBuilder> + getPatchJobInstanceDetailsOrBuilderList() { + if (patchJobInstanceDetailsBuilder_ != null) { + return patchJobInstanceDetailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(patchJobInstanceDetails_); + } + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.Builder + addPatchJobInstanceDetailsBuilder() { + return getPatchJobInstanceDetailsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.Builder + addPatchJobInstanceDetailsBuilder(int index) { + return getPatchJobInstanceDetailsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public java.util.List + getPatchJobInstanceDetailsBuilderList() { + return getPatchJobInstanceDetailsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetailsOrBuilder> + getPatchJobInstanceDetailsFieldBuilder() { + if (patchJobInstanceDetailsBuilder_ == null) { + patchJobInstanceDetailsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetailsOrBuilder>( + patchJobInstanceDetails_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + patchJobInstanceDetails_ = null; + } + return patchJobInstanceDetailsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+       * A pagination token that can be used to get 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 pagination token that can be used to get 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 pagination token that can be used to get 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 pagination token that can be used to get 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 pagination token that can be used to get the next page of results.
+       * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) + private static final com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPatchJobInstanceDetailsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPatchJobInstanceDetailsResponse(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.osconfig.v1.PatchJobs.ListPatchJobInstanceDetailsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PatchJobInstanceDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.PatchJobInstanceDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The instance name in the form `projects/*/zones/*/instances/*`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * The instance name in the form `projects/*/zones/*/instances/*`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * The unique identifier for the instance. This identifier is
+     * defined by the server.
+     * 
+ * + * string instance_system_id = 2; + * + * @return The instanceSystemId. + */ + java.lang.String getInstanceSystemId(); + /** + * + * + *
+     * The unique identifier for the instance. This identifier is
+     * defined by the server.
+     * 
+ * + * string instance_system_id = 2; + * + * @return The bytes for instanceSystemId. + */ + com.google.protobuf.ByteString getInstanceSystemIdBytes(); + + /** + * + * + *
+     * Current state of instance patch.
+     * 
+ * + * .google.cloud.osconfig.v1.Instance.PatchState state = 3; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * Current state of instance patch.
+     * 
+ * + * .google.cloud.osconfig.v1.Instance.PatchState state = 3; + * + * @return The state. + */ + com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState getState(); + + /** + * + * + *
+     * If the patch fails, this field provides the reason.
+     * 
+ * + * string failure_reason = 4; + * + * @return The failureReason. + */ + java.lang.String getFailureReason(); + /** + * + * + *
+     * If the patch fails, this field provides the reason.
+     * 
+ * + * string failure_reason = 4; + * + * @return The bytes for failureReason. + */ + com.google.protobuf.ByteString getFailureReasonBytes(); + + /** + * + * + *
+     * The number of times the agent that the agent attempts to apply the patch.
+     * 
+ * + * int64 attempt_count = 5; + * + * @return The attemptCount. + */ + long getAttemptCount(); + } + /** + * + * + *
+   * Patch details for a VM instance. For more information about reviewing VM
+   * instance details, see
+   * [Listing all VM instance details for a specific patch
+   * job](/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details).
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchJobInstanceDetails} + */ + public static final class PatchJobInstanceDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.PatchJobInstanceDetails) + PatchJobInstanceDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use PatchJobInstanceDetails.newBuilder() to construct. + private PatchJobInstanceDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PatchJobInstanceDetails() { + name_ = ""; + instanceSystemId_ = ""; + state_ = 0; + failureReason_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PatchJobInstanceDetails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PatchJobInstanceDetails( + 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(); + + instanceSystemId_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + failureReason_ = s; + break; + } + case 40: + { + attemptCount_ = input.readInt64(); + 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJobInstanceDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJobInstanceDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * The instance name in the form `projects/*/zones/*/instances/*`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * The instance name in the form `projects/*/zones/*/instances/*`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + 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 INSTANCE_SYSTEM_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object instanceSystemId_; + /** + * + * + *
+     * The unique identifier for the instance. This identifier is
+     * defined by the server.
+     * 
+ * + * string instance_system_id = 2; + * + * @return The instanceSystemId. + */ + public java.lang.String getInstanceSystemId() { + java.lang.Object ref = instanceSystemId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceSystemId_ = s; + return s; + } + } + /** + * + * + *
+     * The unique identifier for the instance. This identifier is
+     * defined by the server.
+     * 
+ * + * string instance_system_id = 2; + * + * @return The bytes for instanceSystemId. + */ + public com.google.protobuf.ByteString getInstanceSystemIdBytes() { + java.lang.Object ref = instanceSystemId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceSystemId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_; + /** + * + * + *
+     * Current state of instance patch.
+     * 
+ * + * .google.cloud.osconfig.v1.Instance.PatchState state = 3; + * + * @return The enum numeric value on the wire for state. + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Current state of instance patch.
+     * 
+ * + * .google.cloud.osconfig.v1.Instance.PatchState state = 3; + * + * @return The state. + */ + public com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState result = + com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState.UNRECOGNIZED + : result; + } + + public static final int FAILURE_REASON_FIELD_NUMBER = 4; + private volatile java.lang.Object failureReason_; + /** + * + * + *
+     * If the patch fails, this field provides the reason.
+     * 
+ * + * string failure_reason = 4; + * + * @return The failureReason. + */ + public java.lang.String getFailureReason() { + java.lang.Object ref = failureReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + failureReason_ = s; + return s; + } + } + /** + * + * + *
+     * If the patch fails, this field provides the reason.
+     * 
+ * + * string failure_reason = 4; + * + * @return The bytes for failureReason. + */ + public com.google.protobuf.ByteString getFailureReasonBytes() { + java.lang.Object ref = failureReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTEMPT_COUNT_FIELD_NUMBER = 5; + private long attemptCount_; + /** + * + * + *
+     * The number of times the agent that the agent attempts to apply the patch.
+     * 
+ * + * int64 attempt_count = 5; + * + * @return The attemptCount. + */ + public long getAttemptCount() { + return attemptCount_; + } + + 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 (!getInstanceSystemIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceSystemId_); + } + if (state_ + != com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState.PATCH_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, state_); + } + if (!getFailureReasonBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, failureReason_); + } + if (attemptCount_ != 0L) { + output.writeInt64(5, attemptCount_); + } + 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 (!getInstanceSystemIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceSystemId_); + } + if (state_ + != com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState.PATCH_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (!getFailureReasonBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, failureReason_); + } + if (attemptCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, attemptCount_); + } + 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.osconfig.v1.PatchJobs.PatchJobInstanceDetails)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails other = + (com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails) obj; + + if (!getName().equals(other.getName())) return false; + if (!getInstanceSystemId().equals(other.getInstanceSystemId())) return false; + if (state_ != other.state_) return false; + if (!getFailureReason().equals(other.getFailureReason())) return false; + if (getAttemptCount() != other.getAttemptCount()) 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) + INSTANCE_SYSTEM_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceSystemId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + FAILURE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getFailureReason().hashCode(); + hash = (37 * hash) + ATTEMPT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAttemptCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails 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.osconfig.v1.PatchJobs.PatchJobInstanceDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails 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.osconfig.v1.PatchJobs.PatchJobInstanceDetails parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails 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.osconfig.v1.PatchJobs.PatchJobInstanceDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails 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.osconfig.v1.PatchJobs.PatchJobInstanceDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails 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.osconfig.v1.PatchJobs.PatchJobInstanceDetails 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; + } + /** + * + * + *
+     * Patch details for a VM instance. For more information about reviewing VM
+     * instance details, see
+     * [Listing all VM instance details for a specific patch
+     * job](/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details).
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchJobInstanceDetails} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.PatchJobInstanceDetails) + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJobInstanceDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJobInstanceDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.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_ = ""; + + instanceSystemId_ = ""; + + state_ = 0; + + failureReason_ = ""; + + attemptCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJobInstanceDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails build() { + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails result = + new com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails(this); + result.name_ = name_; + result.instanceSystemId_ = instanceSystemId_; + result.state_ = state_; + result.failureReason_ = failureReason_; + result.attemptCount_ = attemptCount_; + 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.osconfig.v1.PatchJobs.PatchJobInstanceDetails) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails other) { + if (other + == com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getInstanceSystemId().isEmpty()) { + instanceSystemId_ = other.instanceSystemId_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getFailureReason().isEmpty()) { + failureReason_ = other.failureReason_; + onChanged(); + } + if (other.getAttemptCount() != 0L) { + setAttemptCount(other.getAttemptCount()); + } + 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.osconfig.v1.PatchJobs.PatchJobInstanceDetails parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * The instance name in the form `projects/*/zones/*/instances/*`
+       * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+       * The instance name in the form `projects/*/zones/*/instances/*`
+       * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+       * The instance name in the form `projects/*/zones/*/instances/*`
+       * 
+ * + * string name = 1 [(.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; + } + /** + * + * + *
+       * The instance name in the form `projects/*/zones/*/instances/*`
+       * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The instance name in the form `projects/*/zones/*/instances/*`
+       * 
+ * + * string name = 1 [(.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 instanceSystemId_ = ""; + /** + * + * + *
+       * The unique identifier for the instance. This identifier is
+       * defined by the server.
+       * 
+ * + * string instance_system_id = 2; + * + * @return The instanceSystemId. + */ + public java.lang.String getInstanceSystemId() { + java.lang.Object ref = instanceSystemId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceSystemId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The unique identifier for the instance. This identifier is
+       * defined by the server.
+       * 
+ * + * string instance_system_id = 2; + * + * @return The bytes for instanceSystemId. + */ + public com.google.protobuf.ByteString getInstanceSystemIdBytes() { + java.lang.Object ref = instanceSystemId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceSystemId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The unique identifier for the instance. This identifier is
+       * defined by the server.
+       * 
+ * + * string instance_system_id = 2; + * + * @param value The instanceSystemId to set. + * @return This builder for chaining. + */ + public Builder setInstanceSystemId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceSystemId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The unique identifier for the instance. This identifier is
+       * defined by the server.
+       * 
+ * + * string instance_system_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceSystemId() { + + instanceSystemId_ = getDefaultInstance().getInstanceSystemId(); + onChanged(); + return this; + } + /** + * + * + *
+       * The unique identifier for the instance. This identifier is
+       * defined by the server.
+       * 
+ * + * string instance_system_id = 2; + * + * @param value The bytes for instanceSystemId to set. + * @return This builder for chaining. + */ + public Builder setInstanceSystemIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceSystemId_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+       * Current state of instance patch.
+       * 
+ * + * .google.cloud.osconfig.v1.Instance.PatchState state = 3; + * + * @return The enum numeric value on the wire for state. + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * Current state of instance patch.
+       * 
+ * + * .google.cloud.osconfig.v1.Instance.PatchState state = 3; + * + * @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; + } + /** + * + * + *
+       * Current state of instance patch.
+       * 
+ * + * .google.cloud.osconfig.v1.Instance.PatchState state = 3; + * + * @return The state. + */ + public com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState result = + com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Current state of instance patch.
+       * 
+ * + * .google.cloud.osconfig.v1.Instance.PatchState state = 3; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.osconfig.v1.PatchJobs.Instance.PatchState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Current state of instance patch.
+       * 
+ * + * .google.cloud.osconfig.v1.Instance.PatchState state = 3; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object failureReason_ = ""; + /** + * + * + *
+       * If the patch fails, this field provides the reason.
+       * 
+ * + * string failure_reason = 4; + * + * @return The failureReason. + */ + public java.lang.String getFailureReason() { + java.lang.Object ref = failureReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + failureReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * If the patch fails, this field provides the reason.
+       * 
+ * + * string failure_reason = 4; + * + * @return The bytes for failureReason. + */ + public com.google.protobuf.ByteString getFailureReasonBytes() { + java.lang.Object ref = failureReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * If the patch fails, this field provides the reason.
+       * 
+ * + * string failure_reason = 4; + * + * @param value The failureReason to set. + * @return This builder for chaining. + */ + public Builder setFailureReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + failureReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If the patch fails, this field provides the reason.
+       * 
+ * + * string failure_reason = 4; + * + * @return This builder for chaining. + */ + public Builder clearFailureReason() { + + failureReason_ = getDefaultInstance().getFailureReason(); + onChanged(); + return this; + } + /** + * + * + *
+       * If the patch fails, this field provides the reason.
+       * 
+ * + * string failure_reason = 4; + * + * @param value The bytes for failureReason to set. + * @return This builder for chaining. + */ + public Builder setFailureReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + failureReason_ = value; + onChanged(); + return this; + } + + private long attemptCount_; + /** + * + * + *
+       * The number of times the agent that the agent attempts to apply the patch.
+       * 
+ * + * int64 attempt_count = 5; + * + * @return The attemptCount. + */ + public long getAttemptCount() { + return attemptCount_; + } + /** + * + * + *
+       * The number of times the agent that the agent attempts to apply the patch.
+       * 
+ * + * int64 attempt_count = 5; + * + * @param value The attemptCount to set. + * @return This builder for chaining. + */ + public Builder setAttemptCount(long value) { + + attemptCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The number of times the agent that the agent attempts to apply the patch.
+       * 
+ * + * int64 attempt_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearAttemptCount() { + + attemptCount_ = 0L; + 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.osconfig.v1.PatchJobInstanceDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.PatchJobInstanceDetails) + private static final com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJobInstanceDetails + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PatchJobInstanceDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PatchJobInstanceDetails(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.osconfig.v1.PatchJobs.PatchJobInstanceDetails + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.ListPatchJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. In the form of `projects/*`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+     * Required. In the form of `projects/*`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+     * The maximum number of instance status to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+     * If provided, this field specifies the criteria that must be met by patch
+     * jobs to be included in the response.
+     * Currently, filtering is only available on the patch_deployment field.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+     * If provided, this field specifies the criteria that must be met by patch
+     * jobs to be included in the response.
+     * Currently, filtering is only available on the patch_deployment field.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + } + /** + * + * + *
+   * A request message for listing patch jobs.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchJobsRequest} + */ + public static final class ListPatchJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.ListPatchJobsRequest) + ListPatchJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPatchJobsRequest.newBuilder() to construct. + private ListPatchJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPatchJobsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPatchJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPatchJobsRequest( + 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; + } + 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest.class, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+     * Required. In the form of `projects/*`
+     * 
+ * + * + * 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) { + 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. In the form of `projects/*`
+     * 
+ * + * + * 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 java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+     * The maximum number of instance status to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + 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_; + /** + * + * + *
+     * If provided, this field specifies the criteria that must be met by patch
+     * jobs to be included in the response.
+     * Currently, filtering is only available on the patch_deployment field.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + 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; + } + } + /** + * + * + *
+     * If provided, this field specifies the criteria that must be met by patch
+     * jobs to be included in the response.
+     * Currently, filtering is only available on the patch_deployment field.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!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_); + } + 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_); + } + 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.osconfig.v1.PatchJobs.ListPatchJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest other = + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest) 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 (!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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest 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.osconfig.v1.PatchJobs.ListPatchJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest 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.osconfig.v1.PatchJobs.ListPatchJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest 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.osconfig.v1.PatchJobs.ListPatchJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest 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.osconfig.v1.PatchJobs.ListPatchJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest 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.osconfig.v1.PatchJobs.ListPatchJobsRequest 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 request message for listing patch jobs.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchJobsRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.ListPatchJobsRequest) + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest.class, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest build() { + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest result = + new com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest other) { + if (other + == com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest.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(); + } + 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.osconfig.v1.PatchJobs.ListPatchJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+       * Required. In the form of `projects/*`
+       * 
+ * + * + * 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. In the form of `projects/*`
+       * 
+ * + * + * 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. In the form of `projects/*`
+       * 
+ * + * + * 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. In the form of `projects/*`
+       * 
+ * + * + * 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. In the form of `projects/*`
+       * 
+ * + * + * 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_; + /** + * + * + *
+       * The maximum number of instance status to return.
+       * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+       * The maximum number of instance status to return.
+       * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum number of instance status to return.
+       * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+       * A pagination token returned from a previous call
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A pagination token returned from a previous call
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A pagination token returned from a previous call
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A pagination token returned from a previous call
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+       * A pagination token returned from a previous call
+       * that indicates where this listing should continue from.
+       * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+       * If provided, this field specifies the criteria that must be met by patch
+       * jobs to be included in the response.
+       * Currently, filtering is only available on the patch_deployment field.
+       * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * If provided, this field specifies the criteria that must be met by patch
+       * jobs to be included in the response.
+       * Currently, filtering is only available on the patch_deployment field.
+       * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * If provided, this field specifies the criteria that must be met by patch
+       * jobs to be included in the response.
+       * Currently, filtering is only available on the patch_deployment field.
+       * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If provided, this field specifies the criteria that must be met by patch
+       * jobs to be included in the response.
+       * Currently, filtering is only available on the patch_deployment field.
+       * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+       * If provided, this field specifies the criteria that must be met by patch
+       * jobs to be included in the response.
+       * Currently, filtering is only available on the patch_deployment field.
+       * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + @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.osconfig.v1.ListPatchJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.ListPatchJobsRequest) + private static final com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPatchJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPatchJobsRequest(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.osconfig.v1.PatchJobs.ListPatchJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.ListPatchJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + java.util.List getPatchJobsList(); + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchJob getPatchJobs(int index); + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + int getPatchJobsCount(); + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + java.util.List + getPatchJobsOrBuilderList(); + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchJobOrBuilder getPatchJobsOrBuilder(int index); + + /** + * + * + *
+     * A pagination token that can be used to get the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+     * A pagination token that can be used to get the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + } + /** + * + * + *
+   * A response message for listing patch jobs.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchJobsResponse} + */ + public static final class ListPatchJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.ListPatchJobsResponse) + ListPatchJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPatchJobsResponse.newBuilder() to construct. + private ListPatchJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPatchJobsResponse() { + patchJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPatchJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPatchJobsResponse( + 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)) { + patchJobs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + patchJobs_.add( + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + patchJobs_ = java.util.Collections.unmodifiableList(patchJobs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse.class, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse.Builder.class); + } + + public static final int PATCH_JOBS_FIELD_NUMBER = 1; + private java.util.List patchJobs_; + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public java.util.List getPatchJobsList() { + return patchJobs_; + } + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public java.util.List + getPatchJobsOrBuilderList() { + return patchJobs_; + } + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public int getPatchJobsCount() { + return patchJobs_.size(); + } + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob getPatchJobs(int index) { + return patchJobs_.get(index); + } + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobOrBuilder getPatchJobsOrBuilder( + int index) { + return patchJobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+     * A pagination token that can be used to get 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) { + 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 pagination token that can be used to get 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 java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < patchJobs_.size(); i++) { + output.writeMessage(1, patchJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < patchJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, patchJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse other = + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse) obj; + + if (!getPatchJobsList().equals(other.getPatchJobsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPatchJobsCount() > 0) { + hash = (37 * hash) + PATCH_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getPatchJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse 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.osconfig.v1.PatchJobs.ListPatchJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse 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.osconfig.v1.PatchJobs.ListPatchJobsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse 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.osconfig.v1.PatchJobs.ListPatchJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse 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.osconfig.v1.PatchJobs.ListPatchJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse 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.osconfig.v1.PatchJobs.ListPatchJobsResponse 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 response message for listing patch jobs.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ListPatchJobsResponse} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.ListPatchJobsResponse) + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse.class, + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPatchJobsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (patchJobsBuilder_ == null) { + patchJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + patchJobsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ListPatchJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse build() { + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse result = + new com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse(this); + int from_bitField0_ = bitField0_; + if (patchJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + patchJobs_ = java.util.Collections.unmodifiableList(patchJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.patchJobs_ = patchJobs_; + } else { + result.patchJobs_ = patchJobsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse other) { + if (other + == com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse.getDefaultInstance()) + return this; + if (patchJobsBuilder_ == null) { + if (!other.patchJobs_.isEmpty()) { + if (patchJobs_.isEmpty()) { + patchJobs_ = other.patchJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePatchJobsIsMutable(); + patchJobs_.addAll(other.patchJobs_); + } + onChanged(); + } + } else { + if (!other.patchJobs_.isEmpty()) { + if (patchJobsBuilder_.isEmpty()) { + patchJobsBuilder_.dispose(); + patchJobsBuilder_ = null; + patchJobs_ = other.patchJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + patchJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPatchJobsFieldBuilder() + : null; + } else { + patchJobsBuilder_.addAllMessages(other.patchJobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List patchJobs_ = + java.util.Collections.emptyList(); + + private void ensurePatchJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + patchJobs_ = + new java.util.ArrayList(patchJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchJob, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobOrBuilder> + patchJobsBuilder_; + + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public java.util.List getPatchJobsList() { + if (patchJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(patchJobs_); + } else { + return patchJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public int getPatchJobsCount() { + if (patchJobsBuilder_ == null) { + return patchJobs_.size(); + } else { + return patchJobsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob getPatchJobs(int index) { + if (patchJobsBuilder_ == null) { + return patchJobs_.get(index); + } else { + return patchJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public Builder setPatchJobs( + int index, com.google.cloud.osconfig.v1.PatchJobs.PatchJob value) { + if (patchJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePatchJobsIsMutable(); + patchJobs_.set(index, value); + onChanged(); + } else { + patchJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public Builder setPatchJobs( + int index, com.google.cloud.osconfig.v1.PatchJobs.PatchJob.Builder builderForValue) { + if (patchJobsBuilder_ == null) { + ensurePatchJobsIsMutable(); + patchJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + patchJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public Builder addPatchJobs(com.google.cloud.osconfig.v1.PatchJobs.PatchJob value) { + if (patchJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePatchJobsIsMutable(); + patchJobs_.add(value); + onChanged(); + } else { + patchJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public Builder addPatchJobs( + int index, com.google.cloud.osconfig.v1.PatchJobs.PatchJob value) { + if (patchJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePatchJobsIsMutable(); + patchJobs_.add(index, value); + onChanged(); + } else { + patchJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public Builder addPatchJobs( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.Builder builderForValue) { + if (patchJobsBuilder_ == null) { + ensurePatchJobsIsMutable(); + patchJobs_.add(builderForValue.build()); + onChanged(); + } else { + patchJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public Builder addPatchJobs( + int index, com.google.cloud.osconfig.v1.PatchJobs.PatchJob.Builder builderForValue) { + if (patchJobsBuilder_ == null) { + ensurePatchJobsIsMutable(); + patchJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + patchJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public Builder addAllPatchJobs( + java.lang.Iterable values) { + if (patchJobsBuilder_ == null) { + ensurePatchJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, patchJobs_); + onChanged(); + } else { + patchJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public Builder clearPatchJobs() { + if (patchJobsBuilder_ == null) { + patchJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + patchJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public Builder removePatchJobs(int index) { + if (patchJobsBuilder_ == null) { + ensurePatchJobsIsMutable(); + patchJobs_.remove(index); + onChanged(); + } else { + patchJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.Builder getPatchJobsBuilder( + int index) { + return getPatchJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJobOrBuilder getPatchJobsOrBuilder( + int index) { + if (patchJobsBuilder_ == null) { + return patchJobs_.get(index); + } else { + return patchJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public java.util.List + getPatchJobsOrBuilderList() { + if (patchJobsBuilder_ != null) { + return patchJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(patchJobs_); + } + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.Builder addPatchJobsBuilder() { + return getPatchJobsFieldBuilder() + .addBuilder(com.google.cloud.osconfig.v1.PatchJobs.PatchJob.getDefaultInstance()); + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.Builder addPatchJobsBuilder( + int index) { + return getPatchJobsFieldBuilder() + .addBuilder( + index, com.google.cloud.osconfig.v1.PatchJobs.PatchJob.getDefaultInstance()); + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + public java.util.List + getPatchJobsBuilderList() { + return getPatchJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchJob, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobOrBuilder> + getPatchJobsFieldBuilder() { + if (patchJobsBuilder_ == null) { + patchJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchJob, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchJobOrBuilder>( + patchJobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + patchJobs_ = null; + } + return patchJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+       * A pagination token that can be used to get 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 pagination token that can be used to get 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 pagination token that can be used to get 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 pagination token that can be used to get 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 pagination token that can be used to get the next page of results.
+       * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1.ListPatchJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.ListPatchJobsResponse) + private static final com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ListPatchJobsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPatchJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPatchJobsResponse(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.osconfig.v1.PatchJobs.ListPatchJobsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PatchJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.PatchJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Unique identifier for this patch job in the form
+     * `projects/*/patchJobs/*`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Unique identifier for this patch job in the form
+     * `projects/*/patchJobs/*`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Display name for this patch job. This is not a unique identifier.
+     * 
+ * + * string display_name = 14; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+     * Display name for this patch job. This is not a unique identifier.
+     * 
+ * + * string display_name = 14; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+     * Description of the patch job. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * Description of the patch job. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Time this patch job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+     * Time this patch job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+     * Time this patch job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+     * Last time this patch job was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+     * Last time this patch job was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+     * Last time this patch job was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+     * The current state of the PatchJob .
+     * 
+ * + * .google.cloud.osconfig.v1.PatchJob.State state = 5; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * The current state of the PatchJob .
+     * 
+ * + * .google.cloud.osconfig.v1.PatchJob.State state = 5; + * + * @return The state. + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State getState(); + + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + * + * @return Whether the instanceFilter field is set. + */ + boolean hasInstanceFilter(); + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + * + * @return The instanceFilter. + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter getInstanceFilter(); + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder(); + + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + * + * @return Whether the patchConfig field is set. + */ + boolean hasPatchConfig(); + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + * + * @return The patchConfig. + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig getPatchConfig(); + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder getPatchConfigOrBuilder(); + + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the
+     * patch job times out.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return Whether the duration field is set. + */ + boolean hasDuration(); + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the
+     * patch job times out.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return The duration. + */ + com.google.protobuf.Duration getDuration(); + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the
+     * patch job times out.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + */ + com.google.protobuf.DurationOrBuilder getDurationOrBuilder(); + + /** + * + * + *
+     * Summary of instance details.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + * + * @return Whether the instanceDetailsSummary field is set. + */ + boolean hasInstanceDetailsSummary(); + /** + * + * + *
+     * Summary of instance details.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + * + * @return The instanceDetailsSummary. + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + getInstanceDetailsSummary(); + /** + * + * + *
+     * Summary of instance details.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummaryOrBuilder + getInstanceDetailsSummaryOrBuilder(); + + /** + * + * + *
+     * If this patch job is a dry run, the agent reports that it has
+     * finished without running any updates on the VM instance.
+     * 
+ * + * bool dry_run = 10; + * + * @return The dryRun. + */ + boolean getDryRun(); + + /** + * + * + *
+     * If this patch job failed, this message provides information about the
+     * failure.
+     * 
+ * + * string error_message = 11; + * + * @return The errorMessage. + */ + java.lang.String getErrorMessage(); + /** + * + * + *
+     * If this patch job failed, this message provides information about the
+     * failure.
+     * 
+ * + * string error_message = 11; + * + * @return The bytes for errorMessage. + */ + com.google.protobuf.ByteString getErrorMessageBytes(); + + /** + * + * + *
+     * Reflects the overall progress of the patch job in the range of
+     * 0.0 being no progress to 100.0 being complete.
+     * 
+ * + * double percent_complete = 12; + * + * @return The percentComplete. + */ + double getPercentComplete(); + + /** + * + * + *
+     * Output only. Name of the patch deployment that created this patch job.
+     * 
+ * + * + * string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The patchDeployment. + */ + java.lang.String getPatchDeployment(); + /** + * + * + *
+     * Output only. Name of the patch deployment that created this patch job.
+     * 
+ * + * + * string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for patchDeployment. + */ + com.google.protobuf.ByteString getPatchDeploymentBytes(); + } + /** + * + * + *
+   * A high level representation of a patch job that is either in progress
+   * or has completed.
+   * Instances details are not included in the job. To paginate through instance
+   * details, use ListPatchJobInstanceDetails.
+   * For more information about patch jobs, see
+   * [Creating patch jobs](/compute/docs/os-patch-management/create-patch-job).
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchJob} + */ + public static final class PatchJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.PatchJob) + PatchJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use PatchJob.newBuilder() to construct. + private PatchJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PatchJob() { + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + errorMessage_ = ""; + patchDeployment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PatchJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PatchJob( + 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(); + + description_ = s; + break; + } + case 26: + { + 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 34: + { + 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 40: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 58: + { + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder subBuilder = null; + if (patchConfig_ != null) { + subBuilder = patchConfig_.toBuilder(); + } + patchConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(patchConfig_); + patchConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (duration_ != null) { + subBuilder = duration_.toBuilder(); + } + duration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(duration_); + duration_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.Builder + subBuilder = null; + if (instanceDetailsSummary_ != null) { + subBuilder = instanceDetailsSummary_.toBuilder(); + } + instanceDetailsSummary_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instanceDetailsSummary_); + instanceDetailsSummary_ = subBuilder.buildPartial(); + } + + break; + } + case 80: + { + dryRun_ = input.readBool(); + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + errorMessage_ = s; + break; + } + case 97: + { + percentComplete_ = input.readDouble(); + break; + } + case 106: + { + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder subBuilder = + null; + if (instanceFilter_ != null) { + subBuilder = instanceFilter_.toBuilder(); + } + instanceFilter_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instanceFilter_); + instanceFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + + patchDeployment_ = 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.Builder.class); + } + + /** + * + * + *
+     * Enumeration of the various states a patch job passes through as it
+     * executes.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1.PatchJob.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * State must be specified.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+       * The patch job was successfully initiated.
+       * 
+ * + * STARTED = 1; + */ + STARTED(1), + /** + * + * + *
+       * The patch job is looking up instances to run the patch on.
+       * 
+ * + * INSTANCE_LOOKUP = 2; + */ + INSTANCE_LOOKUP(2), + /** + * + * + *
+       * Instances are being patched.
+       * 
+ * + * PATCHING = 3; + */ + PATCHING(3), + /** + * + * + *
+       * Patch job completed successfully.
+       * 
+ * + * SUCCEEDED = 4; + */ + SUCCEEDED(4), + /** + * + * + *
+       * Patch job completed but there were errors.
+       * 
+ * + * COMPLETED_WITH_ERRORS = 5; + */ + COMPLETED_WITH_ERRORS(5), + /** + * + * + *
+       * The patch job was canceled.
+       * 
+ * + * CANCELED = 6; + */ + CANCELED(6), + /** + * + * + *
+       * The patch job timed out.
+       * 
+ * + * TIMED_OUT = 7; + */ + TIMED_OUT(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * State must be specified.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The patch job was successfully initiated.
+       * 
+ * + * STARTED = 1; + */ + public static final int STARTED_VALUE = 1; + /** + * + * + *
+       * The patch job is looking up instances to run the patch on.
+       * 
+ * + * INSTANCE_LOOKUP = 2; + */ + public static final int INSTANCE_LOOKUP_VALUE = 2; + /** + * + * + *
+       * Instances are being patched.
+       * 
+ * + * PATCHING = 3; + */ + public static final int PATCHING_VALUE = 3; + /** + * + * + *
+       * Patch job completed successfully.
+       * 
+ * + * SUCCEEDED = 4; + */ + public static final int SUCCEEDED_VALUE = 4; + /** + * + * + *
+       * Patch job completed but there were errors.
+       * 
+ * + * COMPLETED_WITH_ERRORS = 5; + */ + public static final int COMPLETED_WITH_ERRORS_VALUE = 5; + /** + * + * + *
+       * The patch job was canceled.
+       * 
+ * + * CANCELED = 6; + */ + public static final int CANCELED_VALUE = 6; + /** + * + * + *
+       * The patch job timed out.
+       * 
+ * + * TIMED_OUT = 7; + */ + public static final int TIMED_OUT_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static 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 STARTED; + case 2: + return INSTANCE_LOOKUP; + case 3: + return PATCHING; + case 4: + return SUCCEEDED; + case 5: + return COMPLETED_WITH_ERRORS; + case 6: + return CANCELED; + case 7: + return TIMED_OUT; + 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() { + 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.osconfig.v1.PatchJobs.PatchJob.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.osconfig.v1.PatchJob.State) + } + + public interface InstanceDetailsSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Number of instances pending patch job.
+       * 
+ * + * int64 pending_instance_count = 1; + * + * @return The pendingInstanceCount. + */ + long getPendingInstanceCount(); + + /** + * + * + *
+       * Number of instances that are inactive.
+       * 
+ * + * int64 inactive_instance_count = 2; + * + * @return The inactiveInstanceCount. + */ + long getInactiveInstanceCount(); + + /** + * + * + *
+       * Number of instances notified about patch job.
+       * 
+ * + * int64 notified_instance_count = 3; + * + * @return The notifiedInstanceCount. + */ + long getNotifiedInstanceCount(); + + /** + * + * + *
+       * Number of instances that have started.
+       * 
+ * + * int64 started_instance_count = 4; + * + * @return The startedInstanceCount. + */ + long getStartedInstanceCount(); + + /** + * + * + *
+       * Number of instances that are downloading patches.
+       * 
+ * + * int64 downloading_patches_instance_count = 5; + * + * @return The downloadingPatchesInstanceCount. + */ + long getDownloadingPatchesInstanceCount(); + + /** + * + * + *
+       * Number of instances that are applying patches.
+       * 
+ * + * int64 applying_patches_instance_count = 6; + * + * @return The applyingPatchesInstanceCount. + */ + long getApplyingPatchesInstanceCount(); + + /** + * + * + *
+       * Number of instances rebooting.
+       * 
+ * + * int64 rebooting_instance_count = 7; + * + * @return The rebootingInstanceCount. + */ + long getRebootingInstanceCount(); + + /** + * + * + *
+       * Number of instances that have completed successfully.
+       * 
+ * + * int64 succeeded_instance_count = 8; + * + * @return The succeededInstanceCount. + */ + long getSucceededInstanceCount(); + + /** + * + * + *
+       * Number of instances that require reboot.
+       * 
+ * + * int64 succeeded_reboot_required_instance_count = 9; + * + * @return The succeededRebootRequiredInstanceCount. + */ + long getSucceededRebootRequiredInstanceCount(); + + /** + * + * + *
+       * Number of instances that failed.
+       * 
+ * + * int64 failed_instance_count = 10; + * + * @return The failedInstanceCount. + */ + long getFailedInstanceCount(); + + /** + * + * + *
+       * Number of instances that have acked and will start shortly.
+       * 
+ * + * int64 acked_instance_count = 11; + * + * @return The ackedInstanceCount. + */ + long getAckedInstanceCount(); + + /** + * + * + *
+       * Number of instances that exceeded the time out while applying the patch.
+       * 
+ * + * int64 timed_out_instance_count = 12; + * + * @return The timedOutInstanceCount. + */ + long getTimedOutInstanceCount(); + + /** + * + * + *
+       * Number of instances that are running the pre-patch step.
+       * 
+ * + * int64 pre_patch_step_instance_count = 13; + * + * @return The prePatchStepInstanceCount. + */ + long getPrePatchStepInstanceCount(); + + /** + * + * + *
+       * Number of instances that are running the post-patch step.
+       * 
+ * + * int64 post_patch_step_instance_count = 14; + * + * @return The postPatchStepInstanceCount. + */ + long getPostPatchStepInstanceCount(); + + /** + * + * + *
+       * Number of instances that do not appear to be running the agent. Check to
+       * ensure that the agent is installed, running, and able to communicate with
+       * the service.
+       * 
+ * + * int64 no_agent_detected_instance_count = 15; + * + * @return The noAgentDetectedInstanceCount. + */ + long getNoAgentDetectedInstanceCount(); + } + /** + * + * + *
+     * A summary of the current patch state across all instances that this patch
+     * job affects. Contains counts of instances in different states. These states
+     * map to `InstancePatchState`. List patch job instance details to see the
+     * specific states of each instance.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} + */ + public static final class InstanceDetailsSummary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary) + InstanceDetailsSummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstanceDetailsSummary.newBuilder() to construct. + private InstanceDetailsSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstanceDetailsSummary() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstanceDetailsSummary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InstanceDetailsSummary( + 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: + { + pendingInstanceCount_ = input.readInt64(); + break; + } + case 16: + { + inactiveInstanceCount_ = input.readInt64(); + break; + } + case 24: + { + notifiedInstanceCount_ = input.readInt64(); + break; + } + case 32: + { + startedInstanceCount_ = input.readInt64(); + break; + } + case 40: + { + downloadingPatchesInstanceCount_ = input.readInt64(); + break; + } + case 48: + { + applyingPatchesInstanceCount_ = input.readInt64(); + break; + } + case 56: + { + rebootingInstanceCount_ = input.readInt64(); + break; + } + case 64: + { + succeededInstanceCount_ = input.readInt64(); + break; + } + case 72: + { + succeededRebootRequiredInstanceCount_ = input.readInt64(); + break; + } + case 80: + { + failedInstanceCount_ = input.readInt64(); + break; + } + case 88: + { + ackedInstanceCount_ = input.readInt64(); + break; + } + case 96: + { + timedOutInstanceCount_ = input.readInt64(); + break; + } + case 104: + { + prePatchStepInstanceCount_ = input.readInt64(); + break; + } + case 112: + { + postPatchStepInstanceCount_ = input.readInt64(); + break; + } + case 120: + { + noAgentDetectedInstanceCount_ = input.readInt64(); + 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJob_InstanceDetailsSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJob_InstanceDetailsSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.Builder + .class); + } + + public static final int PENDING_INSTANCE_COUNT_FIELD_NUMBER = 1; + private long pendingInstanceCount_; + /** + * + * + *
+       * Number of instances pending patch job.
+       * 
+ * + * int64 pending_instance_count = 1; + * + * @return The pendingInstanceCount. + */ + public long getPendingInstanceCount() { + return pendingInstanceCount_; + } + + public static final int INACTIVE_INSTANCE_COUNT_FIELD_NUMBER = 2; + private long inactiveInstanceCount_; + /** + * + * + *
+       * Number of instances that are inactive.
+       * 
+ * + * int64 inactive_instance_count = 2; + * + * @return The inactiveInstanceCount. + */ + public long getInactiveInstanceCount() { + return inactiveInstanceCount_; + } + + public static final int NOTIFIED_INSTANCE_COUNT_FIELD_NUMBER = 3; + private long notifiedInstanceCount_; + /** + * + * + *
+       * Number of instances notified about patch job.
+       * 
+ * + * int64 notified_instance_count = 3; + * + * @return The notifiedInstanceCount. + */ + public long getNotifiedInstanceCount() { + return notifiedInstanceCount_; + } + + public static final int STARTED_INSTANCE_COUNT_FIELD_NUMBER = 4; + private long startedInstanceCount_; + /** + * + * + *
+       * Number of instances that have started.
+       * 
+ * + * int64 started_instance_count = 4; + * + * @return The startedInstanceCount. + */ + public long getStartedInstanceCount() { + return startedInstanceCount_; + } + + public static final int DOWNLOADING_PATCHES_INSTANCE_COUNT_FIELD_NUMBER = 5; + private long downloadingPatchesInstanceCount_; + /** + * + * + *
+       * Number of instances that are downloading patches.
+       * 
+ * + * int64 downloading_patches_instance_count = 5; + * + * @return The downloadingPatchesInstanceCount. + */ + public long getDownloadingPatchesInstanceCount() { + return downloadingPatchesInstanceCount_; + } + + public static final int APPLYING_PATCHES_INSTANCE_COUNT_FIELD_NUMBER = 6; + private long applyingPatchesInstanceCount_; + /** + * + * + *
+       * Number of instances that are applying patches.
+       * 
+ * + * int64 applying_patches_instance_count = 6; + * + * @return The applyingPatchesInstanceCount. + */ + public long getApplyingPatchesInstanceCount() { + return applyingPatchesInstanceCount_; + } + + public static final int REBOOTING_INSTANCE_COUNT_FIELD_NUMBER = 7; + private long rebootingInstanceCount_; + /** + * + * + *
+       * Number of instances rebooting.
+       * 
+ * + * int64 rebooting_instance_count = 7; + * + * @return The rebootingInstanceCount. + */ + public long getRebootingInstanceCount() { + return rebootingInstanceCount_; + } + + public static final int SUCCEEDED_INSTANCE_COUNT_FIELD_NUMBER = 8; + private long succeededInstanceCount_; + /** + * + * + *
+       * Number of instances that have completed successfully.
+       * 
+ * + * int64 succeeded_instance_count = 8; + * + * @return The succeededInstanceCount. + */ + public long getSucceededInstanceCount() { + return succeededInstanceCount_; + } + + public static final int SUCCEEDED_REBOOT_REQUIRED_INSTANCE_COUNT_FIELD_NUMBER = 9; + private long succeededRebootRequiredInstanceCount_; + /** + * + * + *
+       * Number of instances that require reboot.
+       * 
+ * + * int64 succeeded_reboot_required_instance_count = 9; + * + * @return The succeededRebootRequiredInstanceCount. + */ + public long getSucceededRebootRequiredInstanceCount() { + return succeededRebootRequiredInstanceCount_; + } + + public static final int FAILED_INSTANCE_COUNT_FIELD_NUMBER = 10; + private long failedInstanceCount_; + /** + * + * + *
+       * Number of instances that failed.
+       * 
+ * + * int64 failed_instance_count = 10; + * + * @return The failedInstanceCount. + */ + public long getFailedInstanceCount() { + return failedInstanceCount_; + } + + public static final int ACKED_INSTANCE_COUNT_FIELD_NUMBER = 11; + private long ackedInstanceCount_; + /** + * + * + *
+       * Number of instances that have acked and will start shortly.
+       * 
+ * + * int64 acked_instance_count = 11; + * + * @return The ackedInstanceCount. + */ + public long getAckedInstanceCount() { + return ackedInstanceCount_; + } + + public static final int TIMED_OUT_INSTANCE_COUNT_FIELD_NUMBER = 12; + private long timedOutInstanceCount_; + /** + * + * + *
+       * Number of instances that exceeded the time out while applying the patch.
+       * 
+ * + * int64 timed_out_instance_count = 12; + * + * @return The timedOutInstanceCount. + */ + public long getTimedOutInstanceCount() { + return timedOutInstanceCount_; + } + + public static final int PRE_PATCH_STEP_INSTANCE_COUNT_FIELD_NUMBER = 13; + private long prePatchStepInstanceCount_; + /** + * + * + *
+       * Number of instances that are running the pre-patch step.
+       * 
+ * + * int64 pre_patch_step_instance_count = 13; + * + * @return The prePatchStepInstanceCount. + */ + public long getPrePatchStepInstanceCount() { + return prePatchStepInstanceCount_; + } + + public static final int POST_PATCH_STEP_INSTANCE_COUNT_FIELD_NUMBER = 14; + private long postPatchStepInstanceCount_; + /** + * + * + *
+       * Number of instances that are running the post-patch step.
+       * 
+ * + * int64 post_patch_step_instance_count = 14; + * + * @return The postPatchStepInstanceCount. + */ + public long getPostPatchStepInstanceCount() { + return postPatchStepInstanceCount_; + } + + public static final int NO_AGENT_DETECTED_INSTANCE_COUNT_FIELD_NUMBER = 15; + private long noAgentDetectedInstanceCount_; + /** + * + * + *
+       * Number of instances that do not appear to be running the agent. Check to
+       * ensure that the agent is installed, running, and able to communicate with
+       * the service.
+       * 
+ * + * int64 no_agent_detected_instance_count = 15; + * + * @return The noAgentDetectedInstanceCount. + */ + public long getNoAgentDetectedInstanceCount() { + return noAgentDetectedInstanceCount_; + } + + 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 (pendingInstanceCount_ != 0L) { + output.writeInt64(1, pendingInstanceCount_); + } + if (inactiveInstanceCount_ != 0L) { + output.writeInt64(2, inactiveInstanceCount_); + } + if (notifiedInstanceCount_ != 0L) { + output.writeInt64(3, notifiedInstanceCount_); + } + if (startedInstanceCount_ != 0L) { + output.writeInt64(4, startedInstanceCount_); + } + if (downloadingPatchesInstanceCount_ != 0L) { + output.writeInt64(5, downloadingPatchesInstanceCount_); + } + if (applyingPatchesInstanceCount_ != 0L) { + output.writeInt64(6, applyingPatchesInstanceCount_); + } + if (rebootingInstanceCount_ != 0L) { + output.writeInt64(7, rebootingInstanceCount_); + } + if (succeededInstanceCount_ != 0L) { + output.writeInt64(8, succeededInstanceCount_); + } + if (succeededRebootRequiredInstanceCount_ != 0L) { + output.writeInt64(9, succeededRebootRequiredInstanceCount_); + } + if (failedInstanceCount_ != 0L) { + output.writeInt64(10, failedInstanceCount_); + } + if (ackedInstanceCount_ != 0L) { + output.writeInt64(11, ackedInstanceCount_); + } + if (timedOutInstanceCount_ != 0L) { + output.writeInt64(12, timedOutInstanceCount_); + } + if (prePatchStepInstanceCount_ != 0L) { + output.writeInt64(13, prePatchStepInstanceCount_); + } + if (postPatchStepInstanceCount_ != 0L) { + output.writeInt64(14, postPatchStepInstanceCount_); + } + if (noAgentDetectedInstanceCount_ != 0L) { + output.writeInt64(15, noAgentDetectedInstanceCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pendingInstanceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, pendingInstanceCount_); + } + if (inactiveInstanceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, inactiveInstanceCount_); + } + if (notifiedInstanceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, notifiedInstanceCount_); + } + if (startedInstanceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, startedInstanceCount_); + } + if (downloadingPatchesInstanceCount_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 5, downloadingPatchesInstanceCount_); + } + if (applyingPatchesInstanceCount_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 6, applyingPatchesInstanceCount_); + } + if (rebootingInstanceCount_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(7, rebootingInstanceCount_); + } + if (succeededInstanceCount_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(8, succeededInstanceCount_); + } + if (succeededRebootRequiredInstanceCount_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 9, succeededRebootRequiredInstanceCount_); + } + if (failedInstanceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(10, failedInstanceCount_); + } + if (ackedInstanceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(11, ackedInstanceCount_); + } + if (timedOutInstanceCount_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(12, timedOutInstanceCount_); + } + if (prePatchStepInstanceCount_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 13, prePatchStepInstanceCount_); + } + if (postPatchStepInstanceCount_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 14, postPatchStepInstanceCount_); + } + if (noAgentDetectedInstanceCount_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 15, noAgentDetectedInstanceCount_); + } + 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.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary other = + (com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary) obj; + + if (getPendingInstanceCount() != other.getPendingInstanceCount()) return false; + if (getInactiveInstanceCount() != other.getInactiveInstanceCount()) return false; + if (getNotifiedInstanceCount() != other.getNotifiedInstanceCount()) return false; + if (getStartedInstanceCount() != other.getStartedInstanceCount()) return false; + if (getDownloadingPatchesInstanceCount() != other.getDownloadingPatchesInstanceCount()) + return false; + if (getApplyingPatchesInstanceCount() != other.getApplyingPatchesInstanceCount()) + return false; + if (getRebootingInstanceCount() != other.getRebootingInstanceCount()) return false; + if (getSucceededInstanceCount() != other.getSucceededInstanceCount()) return false; + if (getSucceededRebootRequiredInstanceCount() + != other.getSucceededRebootRequiredInstanceCount()) return false; + if (getFailedInstanceCount() != other.getFailedInstanceCount()) return false; + if (getAckedInstanceCount() != other.getAckedInstanceCount()) return false; + if (getTimedOutInstanceCount() != other.getTimedOutInstanceCount()) return false; + if (getPrePatchStepInstanceCount() != other.getPrePatchStepInstanceCount()) return false; + if (getPostPatchStepInstanceCount() != other.getPostPatchStepInstanceCount()) return false; + if (getNoAgentDetectedInstanceCount() != other.getNoAgentDetectedInstanceCount()) + 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) + PENDING_INSTANCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPendingInstanceCount()); + hash = (37 * hash) + INACTIVE_INSTANCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getInactiveInstanceCount()); + hash = (37 * hash) + NOTIFIED_INSTANCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getNotifiedInstanceCount()); + hash = (37 * hash) + STARTED_INSTANCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStartedInstanceCount()); + hash = (37 * hash) + DOWNLOADING_PATCHES_INSTANCE_COUNT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(getDownloadingPatchesInstanceCount()); + hash = (37 * hash) + APPLYING_PATCHES_INSTANCE_COUNT_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashLong(getApplyingPatchesInstanceCount()); + hash = (37 * hash) + REBOOTING_INSTANCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRebootingInstanceCount()); + hash = (37 * hash) + SUCCEEDED_INSTANCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSucceededInstanceCount()); + hash = (37 * hash) + SUCCEEDED_REBOOT_REQUIRED_INSTANCE_COUNT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(getSucceededRebootRequiredInstanceCount()); + hash = (37 * hash) + FAILED_INSTANCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailedInstanceCount()); + hash = (37 * hash) + ACKED_INSTANCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAckedInstanceCount()); + hash = (37 * hash) + TIMED_OUT_INSTANCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimedOutInstanceCount()); + hash = (37 * hash) + PRE_PATCH_STEP_INSTANCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPrePatchStepInstanceCount()); + hash = (37 * hash) + POST_PATCH_STEP_INSTANCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPostPatchStepInstanceCount()); + hash = (37 * hash) + NO_AGENT_DETECTED_INSTANCE_COUNT_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashLong(getNoAgentDetectedInstanceCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + 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.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + 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.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + 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.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + 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.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + 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.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary 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 summary of the current patch state across all instances that this patch
+       * job affects. Contains counts of instances in different states. These states
+       * map to `InstancePatchState`. List patch job instance details to see the
+       * specific states of each instance.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary) + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJob_InstanceDetailsSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJob_InstanceDetailsSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.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(); + pendingInstanceCount_ = 0L; + + inactiveInstanceCount_ = 0L; + + notifiedInstanceCount_ = 0L; + + startedInstanceCount_ = 0L; + + downloadingPatchesInstanceCount_ = 0L; + + applyingPatchesInstanceCount_ = 0L; + + rebootingInstanceCount_ = 0L; + + succeededInstanceCount_ = 0L; + + succeededRebootRequiredInstanceCount_ = 0L; + + failedInstanceCount_ = 0L; + + ackedInstanceCount_ = 0L; + + timedOutInstanceCount_ = 0L; + + prePatchStepInstanceCount_ = 0L; + + postPatchStepInstanceCount_ = 0L; + + noAgentDetectedInstanceCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJob_InstanceDetailsSummary_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary build() { + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary result = + new com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary(this); + result.pendingInstanceCount_ = pendingInstanceCount_; + result.inactiveInstanceCount_ = inactiveInstanceCount_; + result.notifiedInstanceCount_ = notifiedInstanceCount_; + result.startedInstanceCount_ = startedInstanceCount_; + result.downloadingPatchesInstanceCount_ = downloadingPatchesInstanceCount_; + result.applyingPatchesInstanceCount_ = applyingPatchesInstanceCount_; + result.rebootingInstanceCount_ = rebootingInstanceCount_; + result.succeededInstanceCount_ = succeededInstanceCount_; + result.succeededRebootRequiredInstanceCount_ = succeededRebootRequiredInstanceCount_; + result.failedInstanceCount_ = failedInstanceCount_; + result.ackedInstanceCount_ = ackedInstanceCount_; + result.timedOutInstanceCount_ = timedOutInstanceCount_; + result.prePatchStepInstanceCount_ = prePatchStepInstanceCount_; + result.postPatchStepInstanceCount_ = postPatchStepInstanceCount_; + result.noAgentDetectedInstanceCount_ = noAgentDetectedInstanceCount_; + 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.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary) { + return mergeFrom( + (com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary other) { + if (other + == com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + .getDefaultInstance()) return this; + if (other.getPendingInstanceCount() != 0L) { + setPendingInstanceCount(other.getPendingInstanceCount()); + } + if (other.getInactiveInstanceCount() != 0L) { + setInactiveInstanceCount(other.getInactiveInstanceCount()); + } + if (other.getNotifiedInstanceCount() != 0L) { + setNotifiedInstanceCount(other.getNotifiedInstanceCount()); + } + if (other.getStartedInstanceCount() != 0L) { + setStartedInstanceCount(other.getStartedInstanceCount()); + } + if (other.getDownloadingPatchesInstanceCount() != 0L) { + setDownloadingPatchesInstanceCount(other.getDownloadingPatchesInstanceCount()); + } + if (other.getApplyingPatchesInstanceCount() != 0L) { + setApplyingPatchesInstanceCount(other.getApplyingPatchesInstanceCount()); + } + if (other.getRebootingInstanceCount() != 0L) { + setRebootingInstanceCount(other.getRebootingInstanceCount()); + } + if (other.getSucceededInstanceCount() != 0L) { + setSucceededInstanceCount(other.getSucceededInstanceCount()); + } + if (other.getSucceededRebootRequiredInstanceCount() != 0L) { + setSucceededRebootRequiredInstanceCount( + other.getSucceededRebootRequiredInstanceCount()); + } + if (other.getFailedInstanceCount() != 0L) { + setFailedInstanceCount(other.getFailedInstanceCount()); + } + if (other.getAckedInstanceCount() != 0L) { + setAckedInstanceCount(other.getAckedInstanceCount()); + } + if (other.getTimedOutInstanceCount() != 0L) { + setTimedOutInstanceCount(other.getTimedOutInstanceCount()); + } + if (other.getPrePatchStepInstanceCount() != 0L) { + setPrePatchStepInstanceCount(other.getPrePatchStepInstanceCount()); + } + if (other.getPostPatchStepInstanceCount() != 0L) { + setPostPatchStepInstanceCount(other.getPostPatchStepInstanceCount()); + } + if (other.getNoAgentDetectedInstanceCount() != 0L) { + setNoAgentDetectedInstanceCount(other.getNoAgentDetectedInstanceCount()); + } + 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.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long pendingInstanceCount_; + /** + * + * + *
+         * Number of instances pending patch job.
+         * 
+ * + * int64 pending_instance_count = 1; + * + * @return The pendingInstanceCount. + */ + public long getPendingInstanceCount() { + return pendingInstanceCount_; + } + /** + * + * + *
+         * Number of instances pending patch job.
+         * 
+ * + * int64 pending_instance_count = 1; + * + * @param value The pendingInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setPendingInstanceCount(long value) { + + pendingInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances pending patch job.
+         * 
+ * + * int64 pending_instance_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearPendingInstanceCount() { + + pendingInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long inactiveInstanceCount_; + /** + * + * + *
+         * Number of instances that are inactive.
+         * 
+ * + * int64 inactive_instance_count = 2; + * + * @return The inactiveInstanceCount. + */ + public long getInactiveInstanceCount() { + return inactiveInstanceCount_; + } + /** + * + * + *
+         * Number of instances that are inactive.
+         * 
+ * + * int64 inactive_instance_count = 2; + * + * @param value The inactiveInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setInactiveInstanceCount(long value) { + + inactiveInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that are inactive.
+         * 
+ * + * int64 inactive_instance_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearInactiveInstanceCount() { + + inactiveInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long notifiedInstanceCount_; + /** + * + * + *
+         * Number of instances notified about patch job.
+         * 
+ * + * int64 notified_instance_count = 3; + * + * @return The notifiedInstanceCount. + */ + public long getNotifiedInstanceCount() { + return notifiedInstanceCount_; + } + /** + * + * + *
+         * Number of instances notified about patch job.
+         * 
+ * + * int64 notified_instance_count = 3; + * + * @param value The notifiedInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setNotifiedInstanceCount(long value) { + + notifiedInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances notified about patch job.
+         * 
+ * + * int64 notified_instance_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearNotifiedInstanceCount() { + + notifiedInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long startedInstanceCount_; + /** + * + * + *
+         * Number of instances that have started.
+         * 
+ * + * int64 started_instance_count = 4; + * + * @return The startedInstanceCount. + */ + public long getStartedInstanceCount() { + return startedInstanceCount_; + } + /** + * + * + *
+         * Number of instances that have started.
+         * 
+ * + * int64 started_instance_count = 4; + * + * @param value The startedInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setStartedInstanceCount(long value) { + + startedInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that have started.
+         * 
+ * + * int64 started_instance_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearStartedInstanceCount() { + + startedInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long downloadingPatchesInstanceCount_; + /** + * + * + *
+         * Number of instances that are downloading patches.
+         * 
+ * + * int64 downloading_patches_instance_count = 5; + * + * @return The downloadingPatchesInstanceCount. + */ + public long getDownloadingPatchesInstanceCount() { + return downloadingPatchesInstanceCount_; + } + /** + * + * + *
+         * Number of instances that are downloading patches.
+         * 
+ * + * int64 downloading_patches_instance_count = 5; + * + * @param value The downloadingPatchesInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setDownloadingPatchesInstanceCount(long value) { + + downloadingPatchesInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that are downloading patches.
+         * 
+ * + * int64 downloading_patches_instance_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearDownloadingPatchesInstanceCount() { + + downloadingPatchesInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long applyingPatchesInstanceCount_; + /** + * + * + *
+         * Number of instances that are applying patches.
+         * 
+ * + * int64 applying_patches_instance_count = 6; + * + * @return The applyingPatchesInstanceCount. + */ + public long getApplyingPatchesInstanceCount() { + return applyingPatchesInstanceCount_; + } + /** + * + * + *
+         * Number of instances that are applying patches.
+         * 
+ * + * int64 applying_patches_instance_count = 6; + * + * @param value The applyingPatchesInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setApplyingPatchesInstanceCount(long value) { + + applyingPatchesInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that are applying patches.
+         * 
+ * + * int64 applying_patches_instance_count = 6; + * + * @return This builder for chaining. + */ + public Builder clearApplyingPatchesInstanceCount() { + + applyingPatchesInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long rebootingInstanceCount_; + /** + * + * + *
+         * Number of instances rebooting.
+         * 
+ * + * int64 rebooting_instance_count = 7; + * + * @return The rebootingInstanceCount. + */ + public long getRebootingInstanceCount() { + return rebootingInstanceCount_; + } + /** + * + * + *
+         * Number of instances rebooting.
+         * 
+ * + * int64 rebooting_instance_count = 7; + * + * @param value The rebootingInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setRebootingInstanceCount(long value) { + + rebootingInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances rebooting.
+         * 
+ * + * int64 rebooting_instance_count = 7; + * + * @return This builder for chaining. + */ + public Builder clearRebootingInstanceCount() { + + rebootingInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long succeededInstanceCount_; + /** + * + * + *
+         * Number of instances that have completed successfully.
+         * 
+ * + * int64 succeeded_instance_count = 8; + * + * @return The succeededInstanceCount. + */ + public long getSucceededInstanceCount() { + return succeededInstanceCount_; + } + /** + * + * + *
+         * Number of instances that have completed successfully.
+         * 
+ * + * int64 succeeded_instance_count = 8; + * + * @param value The succeededInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setSucceededInstanceCount(long value) { + + succeededInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that have completed successfully.
+         * 
+ * + * int64 succeeded_instance_count = 8; + * + * @return This builder for chaining. + */ + public Builder clearSucceededInstanceCount() { + + succeededInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long succeededRebootRequiredInstanceCount_; + /** + * + * + *
+         * Number of instances that require reboot.
+         * 
+ * + * int64 succeeded_reboot_required_instance_count = 9; + * + * @return The succeededRebootRequiredInstanceCount. + */ + public long getSucceededRebootRequiredInstanceCount() { + return succeededRebootRequiredInstanceCount_; + } + /** + * + * + *
+         * Number of instances that require reboot.
+         * 
+ * + * int64 succeeded_reboot_required_instance_count = 9; + * + * @param value The succeededRebootRequiredInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setSucceededRebootRequiredInstanceCount(long value) { + + succeededRebootRequiredInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that require reboot.
+         * 
+ * + * int64 succeeded_reboot_required_instance_count = 9; + * + * @return This builder for chaining. + */ + public Builder clearSucceededRebootRequiredInstanceCount() { + + succeededRebootRequiredInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long failedInstanceCount_; + /** + * + * + *
+         * Number of instances that failed.
+         * 
+ * + * int64 failed_instance_count = 10; + * + * @return The failedInstanceCount. + */ + public long getFailedInstanceCount() { + return failedInstanceCount_; + } + /** + * + * + *
+         * Number of instances that failed.
+         * 
+ * + * int64 failed_instance_count = 10; + * + * @param value The failedInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setFailedInstanceCount(long value) { + + failedInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that failed.
+         * 
+ * + * int64 failed_instance_count = 10; + * + * @return This builder for chaining. + */ + public Builder clearFailedInstanceCount() { + + failedInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long ackedInstanceCount_; + /** + * + * + *
+         * Number of instances that have acked and will start shortly.
+         * 
+ * + * int64 acked_instance_count = 11; + * + * @return The ackedInstanceCount. + */ + public long getAckedInstanceCount() { + return ackedInstanceCount_; + } + /** + * + * + *
+         * Number of instances that have acked and will start shortly.
+         * 
+ * + * int64 acked_instance_count = 11; + * + * @param value The ackedInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setAckedInstanceCount(long value) { + + ackedInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that have acked and will start shortly.
+         * 
+ * + * int64 acked_instance_count = 11; + * + * @return This builder for chaining. + */ + public Builder clearAckedInstanceCount() { + + ackedInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long timedOutInstanceCount_; + /** + * + * + *
+         * Number of instances that exceeded the time out while applying the patch.
+         * 
+ * + * int64 timed_out_instance_count = 12; + * + * @return The timedOutInstanceCount. + */ + public long getTimedOutInstanceCount() { + return timedOutInstanceCount_; + } + /** + * + * + *
+         * Number of instances that exceeded the time out while applying the patch.
+         * 
+ * + * int64 timed_out_instance_count = 12; + * + * @param value The timedOutInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setTimedOutInstanceCount(long value) { + + timedOutInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that exceeded the time out while applying the patch.
+         * 
+ * + * int64 timed_out_instance_count = 12; + * + * @return This builder for chaining. + */ + public Builder clearTimedOutInstanceCount() { + + timedOutInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long prePatchStepInstanceCount_; + /** + * + * + *
+         * Number of instances that are running the pre-patch step.
+         * 
+ * + * int64 pre_patch_step_instance_count = 13; + * + * @return The prePatchStepInstanceCount. + */ + public long getPrePatchStepInstanceCount() { + return prePatchStepInstanceCount_; + } + /** + * + * + *
+         * Number of instances that are running the pre-patch step.
+         * 
+ * + * int64 pre_patch_step_instance_count = 13; + * + * @param value The prePatchStepInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setPrePatchStepInstanceCount(long value) { + + prePatchStepInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that are running the pre-patch step.
+         * 
+ * + * int64 pre_patch_step_instance_count = 13; + * + * @return This builder for chaining. + */ + public Builder clearPrePatchStepInstanceCount() { + + prePatchStepInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long postPatchStepInstanceCount_; + /** + * + * + *
+         * Number of instances that are running the post-patch step.
+         * 
+ * + * int64 post_patch_step_instance_count = 14; + * + * @return The postPatchStepInstanceCount. + */ + public long getPostPatchStepInstanceCount() { + return postPatchStepInstanceCount_; + } + /** + * + * + *
+         * Number of instances that are running the post-patch step.
+         * 
+ * + * int64 post_patch_step_instance_count = 14; + * + * @param value The postPatchStepInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setPostPatchStepInstanceCount(long value) { + + postPatchStepInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that are running the post-patch step.
+         * 
+ * + * int64 post_patch_step_instance_count = 14; + * + * @return This builder for chaining. + */ + public Builder clearPostPatchStepInstanceCount() { + + postPatchStepInstanceCount_ = 0L; + onChanged(); + return this; + } + + private long noAgentDetectedInstanceCount_; + /** + * + * + *
+         * Number of instances that do not appear to be running the agent. Check to
+         * ensure that the agent is installed, running, and able to communicate with
+         * the service.
+         * 
+ * + * int64 no_agent_detected_instance_count = 15; + * + * @return The noAgentDetectedInstanceCount. + */ + public long getNoAgentDetectedInstanceCount() { + return noAgentDetectedInstanceCount_; + } + /** + * + * + *
+         * Number of instances that do not appear to be running the agent. Check to
+         * ensure that the agent is installed, running, and able to communicate with
+         * the service.
+         * 
+ * + * int64 no_agent_detected_instance_count = 15; + * + * @param value The noAgentDetectedInstanceCount to set. + * @return This builder for chaining. + */ + public Builder setNoAgentDetectedInstanceCount(long value) { + + noAgentDetectedInstanceCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of instances that do not appear to be running the agent. Check to
+         * ensure that the agent is installed, running, and able to communicate with
+         * the service.
+         * 
+ * + * int64 no_agent_detected_instance_count = 15; + * + * @return This builder for chaining. + */ + public Builder clearNoAgentDetectedInstanceCount() { + + noAgentDetectedInstanceCount_ = 0L; + 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.osconfig.v1.PatchJob.InstanceDetailsSummary) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary) + private static final com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceDetailsSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InstanceDetailsSummary(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.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Unique identifier for this patch job in the form
+     * `projects/*/patchJobs/*`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + 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; + } + } + /** + * + * + *
+     * Unique identifier for this patch job in the form
+     * `projects/*/patchJobs/*`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + 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 DISPLAY_NAME_FIELD_NUMBER = 14; + private volatile java.lang.Object displayName_; + /** + * + * + *
+     * Display name for this patch job. This is not a unique identifier.
+     * 
+ * + * string display_name = 14; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+     * Display name for this patch job. This is not a unique identifier.
+     * 
+ * + * string display_name = 14; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * Description of the patch job. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * Description of the patch job. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + 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 = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+     * Time this patch job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+     * Time this patch job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+     * Time this patch job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+     * Last time this patch job was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+     * Last time this patch job was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+     * Last time this patch job was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_; + /** + * + * + *
+     * The current state of the PatchJob .
+     * 
+ * + * .google.cloud.osconfig.v1.PatchJob.State state = 5; + * + * @return The enum numeric value on the wire for state. + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The current state of the PatchJob .
+     * 
+ * + * .google.cloud.osconfig.v1.PatchJob.State state = 5; + * + * @return The state. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State result = + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State.UNRECOGNIZED + : result; + } + + public static final int INSTANCE_FILTER_FIELD_NUMBER = 13; + private com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter instanceFilter_; + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + * + * @return Whether the instanceFilter field is set. + */ + public boolean hasInstanceFilter() { + return instanceFilter_ != null; + } + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + * + * @return The instanceFilter. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter getInstanceFilter() { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + return getInstanceFilter(); + } + + public static final int PATCH_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.osconfig.v1.PatchJobs.PatchConfig patchConfig_; + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + * + * @return Whether the patchConfig field is set. + */ + public boolean hasPatchConfig() { + return patchConfig_ != null; + } + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + * + * @return The patchConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig getPatchConfig() { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder getPatchConfigOrBuilder() { + return getPatchConfig(); + } + + public static final int DURATION_FIELD_NUMBER = 8; + private com.google.protobuf.Duration duration_; + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the
+     * patch job times out.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return Whether the duration field is set. + */ + public boolean hasDuration() { + return duration_ != null; + } + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the
+     * patch job times out.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return The duration. + */ + public com.google.protobuf.Duration getDuration() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + /** + * + * + *
+     * Duration of the patch job. After the duration ends, the
+     * patch job times out.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + return getDuration(); + } + + public static final int INSTANCE_DETAILS_SUMMARY_FIELD_NUMBER = 9; + private com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + instanceDetailsSummary_; + /** + * + * + *
+     * Summary of instance details.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + * + * @return Whether the instanceDetailsSummary field is set. + */ + public boolean hasInstanceDetailsSummary() { + return instanceDetailsSummary_ != null; + } + /** + * + * + *
+     * Summary of instance details.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + * + * @return The instanceDetailsSummary. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + getInstanceDetailsSummary() { + return instanceDetailsSummary_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + .getDefaultInstance() + : instanceDetailsSummary_; + } + /** + * + * + *
+     * Summary of instance details.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummaryOrBuilder + getInstanceDetailsSummaryOrBuilder() { + return getInstanceDetailsSummary(); + } + + public static final int DRY_RUN_FIELD_NUMBER = 10; + private boolean dryRun_; + /** + * + * + *
+     * If this patch job is a dry run, the agent reports that it has
+     * finished without running any updates on the VM instance.
+     * 
+ * + * bool dry_run = 10; + * + * @return The dryRun. + */ + public boolean getDryRun() { + return dryRun_; + } + + public static final int ERROR_MESSAGE_FIELD_NUMBER = 11; + private volatile java.lang.Object errorMessage_; + /** + * + * + *
+     * If this patch job failed, this message provides information about the
+     * failure.
+     * 
+ * + * string error_message = 11; + * + * @return The errorMessage. + */ + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } + } + /** + * + * + *
+     * If this patch job failed, this message provides information about the
+     * failure.
+     * 
+ * + * string error_message = 11; + * + * @return The bytes for errorMessage. + */ + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERCENT_COMPLETE_FIELD_NUMBER = 12; + private double percentComplete_; + /** + * + * + *
+     * Reflects the overall progress of the patch job in the range of
+     * 0.0 being no progress to 100.0 being complete.
+     * 
+ * + * double percent_complete = 12; + * + * @return The percentComplete. + */ + public double getPercentComplete() { + return percentComplete_; + } + + public static final int PATCH_DEPLOYMENT_FIELD_NUMBER = 15; + private volatile java.lang.Object patchDeployment_; + /** + * + * + *
+     * Output only. Name of the patch deployment that created this patch job.
+     * 
+ * + * + * string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The patchDeployment. + */ + public java.lang.String getPatchDeployment() { + java.lang.Object ref = patchDeployment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + patchDeployment_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. Name of the patch deployment that created this patch job.
+     * 
+ * + * + * string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for patchDeployment. + */ + public com.google.protobuf.ByteString getPatchDeploymentBytes() { + java.lang.Object ref = patchDeployment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + patchDeployment_ = 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 (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (state_ + != com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (patchConfig_ != null) { + output.writeMessage(7, getPatchConfig()); + } + if (duration_ != null) { + output.writeMessage(8, getDuration()); + } + if (instanceDetailsSummary_ != null) { + output.writeMessage(9, getInstanceDetailsSummary()); + } + if (dryRun_ != false) { + output.writeBool(10, dryRun_); + } + if (!getErrorMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, errorMessage_); + } + if (percentComplete_ != 0D) { + output.writeDouble(12, percentComplete_); + } + if (instanceFilter_ != null) { + output.writeMessage(13, getInstanceFilter()); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, displayName_); + } + if (!getPatchDeploymentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, patchDeployment_); + } + 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 (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (state_ + != com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + if (patchConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPatchConfig()); + } + if (duration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDuration()); + } + if (instanceDetailsSummary_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, getInstanceDetailsSummary()); + } + if (dryRun_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, dryRun_); + } + if (!getErrorMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, errorMessage_); + } + if (percentComplete_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(12, percentComplete_); + } + if (instanceFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getInstanceFilter()); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, displayName_); + } + if (!getPatchDeploymentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, patchDeployment_); + } + 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.osconfig.v1.PatchJobs.PatchJob)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.PatchJob other = + (com.google.cloud.osconfig.v1.PatchJobs.PatchJob) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) 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 (state_ != other.state_) return false; + if (hasInstanceFilter() != other.hasInstanceFilter()) return false; + if (hasInstanceFilter()) { + if (!getInstanceFilter().equals(other.getInstanceFilter())) return false; + } + if (hasPatchConfig() != other.hasPatchConfig()) return false; + if (hasPatchConfig()) { + if (!getPatchConfig().equals(other.getPatchConfig())) return false; + } + if (hasDuration() != other.hasDuration()) return false; + if (hasDuration()) { + if (!getDuration().equals(other.getDuration())) return false; + } + if (hasInstanceDetailsSummary() != other.hasInstanceDetailsSummary()) return false; + if (hasInstanceDetailsSummary()) { + if (!getInstanceDetailsSummary().equals(other.getInstanceDetailsSummary())) return false; + } + if (getDryRun() != other.getDryRun()) return false; + if (!getErrorMessage().equals(other.getErrorMessage())) return false; + if (java.lang.Double.doubleToLongBits(getPercentComplete()) + != java.lang.Double.doubleToLongBits(other.getPercentComplete())) return false; + if (!getPatchDeployment().equals(other.getPatchDeployment())) 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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().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(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasInstanceFilter()) { + hash = (37 * hash) + INSTANCE_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getInstanceFilter().hashCode(); + } + if (hasPatchConfig()) { + hash = (37 * hash) + PATCH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPatchConfig().hashCode(); + } + if (hasDuration()) { + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration().hashCode(); + } + if (hasInstanceDetailsSummary()) { + hash = (37 * hash) + INSTANCE_DETAILS_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getInstanceDetailsSummary().hashCode(); + } + hash = (37 * hash) + DRY_RUN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDryRun()); + hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getErrorMessage().hashCode(); + hash = (37 * hash) + PERCENT_COMPLETE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPercentComplete())); + hash = (37 * hash) + PATCH_DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getPatchDeployment().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob 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.osconfig.v1.PatchJobs.PatchJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob 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.osconfig.v1.PatchJobs.PatchJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob 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.osconfig.v1.PatchJobs.PatchJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob 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.osconfig.v1.PatchJobs.PatchJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob 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.osconfig.v1.PatchJobs.PatchJob 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 high level representation of a patch job that is either in progress
+     * or has completed.
+     * Instances details are not included in the job. To paginate through instance
+     * details, use ListPatchJobInstanceDetails.
+     * For more information about patch jobs, see
+     * [Creating patch jobs](/compute/docs/os-patch-management/create-patch-job).
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchJob} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.PatchJob) + com.google.cloud.osconfig.v1.PatchJobs.PatchJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.PatchJob.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_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + state_ = 0; + + if (instanceFilterBuilder_ == null) { + instanceFilter_ = null; + } else { + instanceFilter_ = null; + instanceFilterBuilder_ = null; + } + if (patchConfigBuilder_ == null) { + patchConfig_ = null; + } else { + patchConfig_ = null; + patchConfigBuilder_ = null; + } + if (durationBuilder_ == null) { + duration_ = null; + } else { + duration_ = null; + durationBuilder_ = null; + } + if (instanceDetailsSummaryBuilder_ == null) { + instanceDetailsSummary_ = null; + } else { + instanceDetailsSummary_ = null; + instanceDetailsSummaryBuilder_ = null; + } + dryRun_ = false; + + errorMessage_ = ""; + + percentComplete_ = 0D; + + patchDeployment_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.PatchJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob build() { + com.google.cloud.osconfig.v1.PatchJobs.PatchJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.PatchJob result = + new com.google.cloud.osconfig.v1.PatchJobs.PatchJob(this); + result.name_ = name_; + result.displayName_ = displayName_; + 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.state_ = state_; + if (instanceFilterBuilder_ == null) { + result.instanceFilter_ = instanceFilter_; + } else { + result.instanceFilter_ = instanceFilterBuilder_.build(); + } + if (patchConfigBuilder_ == null) { + result.patchConfig_ = patchConfig_; + } else { + result.patchConfig_ = patchConfigBuilder_.build(); + } + if (durationBuilder_ == null) { + result.duration_ = duration_; + } else { + result.duration_ = durationBuilder_.build(); + } + if (instanceDetailsSummaryBuilder_ == null) { + result.instanceDetailsSummary_ = instanceDetailsSummary_; + } else { + result.instanceDetailsSummary_ = instanceDetailsSummaryBuilder_.build(); + } + result.dryRun_ = dryRun_; + result.errorMessage_ = errorMessage_; + result.percentComplete_ = percentComplete_; + result.patchDeployment_ = patchDeployment_; + 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.osconfig.v1.PatchJobs.PatchJob) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.PatchJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.PatchJob other) { + if (other == com.google.cloud.osconfig.v1.PatchJobs.PatchJob.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasInstanceFilter()) { + mergeInstanceFilter(other.getInstanceFilter()); + } + if (other.hasPatchConfig()) { + mergePatchConfig(other.getPatchConfig()); + } + if (other.hasDuration()) { + mergeDuration(other.getDuration()); + } + if (other.hasInstanceDetailsSummary()) { + mergeInstanceDetailsSummary(other.getInstanceDetailsSummary()); + } + if (other.getDryRun() != false) { + setDryRun(other.getDryRun()); + } + if (!other.getErrorMessage().isEmpty()) { + errorMessage_ = other.errorMessage_; + onChanged(); + } + if (other.getPercentComplete() != 0D) { + setPercentComplete(other.getPercentComplete()); + } + if (!other.getPatchDeployment().isEmpty()) { + patchDeployment_ = other.patchDeployment_; + 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.osconfig.v1.PatchJobs.PatchJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.PatchJob) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Unique identifier for this patch job in the form
+       * `projects/*/patchJobs/*`
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Unique identifier for this patch job in the form
+       * `projects/*/patchJobs/*`
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Unique identifier for this patch job in the form
+       * `projects/*/patchJobs/*`
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Unique identifier for this patch job in the form
+       * `projects/*/patchJobs/*`
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Unique identifier for this patch job in the form
+       * `projects/*/patchJobs/*`
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+       * Display name for this patch job. This is not a unique identifier.
+       * 
+ * + * string display_name = 14; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Display name for this patch job. This is not a unique identifier.
+       * 
+ * + * string display_name = 14; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Display name for this patch job. This is not a unique identifier.
+       * 
+ * + * string display_name = 14; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Display name for this patch job. This is not a unique identifier.
+       * 
+ * + * string display_name = 14; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Display name for this patch job. This is not a unique identifier.
+       * 
+ * + * string display_name = 14; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * Description of the patch job. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Description of the patch job. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Description of the patch job. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Description of the patch job. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * Description of the patch job. Length of the description is limited
+       * to 1024 characters.
+       * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+       * Time this patch job was created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+       * Time this patch job was created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @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(); + } + } + /** + * + * + *
+       * Time this patch job was created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + 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; + } + /** + * + * + *
+       * Time this patch job was created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Time this patch job was created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + 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; + } + /** + * + * + *
+       * Time this patch job was created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Time this patch job was created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Time this patch job was created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+       * Time this patch job was created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 3; + */ + 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_; + /** + * + * + *
+       * Last time this patch job was updated.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+       * Last time this patch job was updated.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @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(); + } + } + /** + * + * + *
+       * Last time this patch job was updated.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + 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; + } + /** + * + * + *
+       * Last time this patch job was updated.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Last time this patch job was updated.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + 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; + } + /** + * + * + *
+       * Last time this patch job was updated.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Last time this patch job was updated.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Last time this patch job was updated.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+       * Last time this patch job was updated.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + 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 int state_ = 0; + /** + * + * + *
+       * The current state of the PatchJob .
+       * 
+ * + * .google.cloud.osconfig.v1.PatchJob.State state = 5; + * + * @return The enum numeric value on the wire for state. + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * The current state of the PatchJob .
+       * 
+ * + * .google.cloud.osconfig.v1.PatchJob.State state = 5; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The current state of the PatchJob .
+       * 
+ * + * .google.cloud.osconfig.v1.PatchJob.State state = 5; + * + * @return The state. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State result = + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The current state of the PatchJob .
+       * 
+ * + * .google.cloud.osconfig.v1.PatchJob.State state = 5; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.osconfig.v1.PatchJobs.PatchJob.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The current state of the PatchJob .
+       * 
+ * + * .google.cloud.osconfig.v1.PatchJob.State state = 5; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter instanceFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder> + instanceFilterBuilder_; + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + * + * @return Whether the instanceFilter field is set. + */ + public boolean hasInstanceFilter() { + return instanceFilterBuilder_ != null || instanceFilter_ != null; + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + * + * @return The instanceFilter. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter getInstanceFilter() { + if (instanceFilterBuilder_ == null) { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } else { + return instanceFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter value) { + if (instanceFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceFilter_ = value; + onChanged(); + } else { + instanceFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder builderForValue) { + if (instanceFilterBuilder_ == null) { + instanceFilter_ = builderForValue.build(); + onChanged(); + } else { + instanceFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + */ + public Builder mergeInstanceFilter( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter value) { + if (instanceFilterBuilder_ == null) { + if (instanceFilter_ != null) { + instanceFilter_ = + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.newBuilder( + instanceFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + instanceFilter_ = value; + } + onChanged(); + } else { + instanceFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + */ + public Builder clearInstanceFilter() { + if (instanceFilterBuilder_ == null) { + instanceFilter_ = null; + onChanged(); + } else { + instanceFilter_ = null; + instanceFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder + getInstanceFilterBuilder() { + + onChanged(); + return getInstanceFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + if (instanceFilterBuilder_ != null) { + return instanceFilterBuilder_.getMessageOrBuilder(); + } else { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder> + getInstanceFilterFieldBuilder() { + if (instanceFilterBuilder_ == null) { + instanceFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder>( + getInstanceFilter(), getParentForChildren(), isClean()); + instanceFilter_ = null; + } + return instanceFilterBuilder_; + } + + private com.google.cloud.osconfig.v1.PatchJobs.PatchConfig patchConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder> + patchConfigBuilder_; + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + * + * @return Whether the patchConfig field is set. + */ + public boolean hasPatchConfig() { + return patchConfigBuilder_ != null || patchConfig_ != null; + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + * + * @return The patchConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig getPatchConfig() { + if (patchConfigBuilder_ == null) { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } else { + return patchConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + */ + public Builder setPatchConfig(com.google.cloud.osconfig.v1.PatchJobs.PatchConfig value) { + if (patchConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + patchConfig_ = value; + onChanged(); + } else { + patchConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + */ + public Builder setPatchConfig( + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder builderForValue) { + if (patchConfigBuilder_ == null) { + patchConfig_ = builderForValue.build(); + onChanged(); + } else { + patchConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + */ + public Builder mergePatchConfig(com.google.cloud.osconfig.v1.PatchJobs.PatchConfig value) { + if (patchConfigBuilder_ == null) { + if (patchConfig_ != null) { + patchConfig_ = + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.newBuilder(patchConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + patchConfig_ = value; + } + onChanged(); + } else { + patchConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + */ + public Builder clearPatchConfig() { + if (patchConfigBuilder_ == null) { + patchConfig_ = null; + onChanged(); + } else { + patchConfig_ = null; + patchConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder getPatchConfigBuilder() { + + onChanged(); + return getPatchConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder getPatchConfigOrBuilder() { + if (patchConfigBuilder_ != null) { + return patchConfigBuilder_.getMessageOrBuilder(); + } else { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder> + getPatchConfigFieldBuilder() { + if (patchConfigBuilder_ == null) { + patchConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder>( + getPatchConfig(), getParentForChildren(), isClean()); + patchConfig_ = null; + } + return patchConfigBuilder_; + } + + private com.google.protobuf.Duration duration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + durationBuilder_; + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the
+       * patch job times out.
+       * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return Whether the duration field is set. + */ + public boolean hasDuration() { + return durationBuilder_ != null || duration_ != null; + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the
+       * patch job times out.
+       * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return The duration. + */ + public com.google.protobuf.Duration getDuration() { + if (durationBuilder_ == null) { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } else { + return durationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the
+       * patch job times out.
+       * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public Builder setDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + duration_ = value; + onChanged(); + } else { + durationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the
+       * patch job times out.
+       * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (durationBuilder_ == null) { + duration_ = builderForValue.build(); + onChanged(); + } else { + durationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the
+       * patch job times out.
+       * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public Builder mergeDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (duration_ != null) { + duration_ = + com.google.protobuf.Duration.newBuilder(duration_).mergeFrom(value).buildPartial(); + } else { + duration_ = value; + } + onChanged(); + } else { + durationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the
+       * patch job times out.
+       * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public Builder clearDuration() { + if (durationBuilder_ == null) { + duration_ = null; + onChanged(); + } else { + duration_ = null; + durationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the
+       * patch job times out.
+       * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public com.google.protobuf.Duration.Builder getDurationBuilder() { + + onChanged(); + return getDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the
+       * patch job times out.
+       * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + if (durationBuilder_ != null) { + return durationBuilder_.getMessageOrBuilder(); + } else { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + } + /** + * + * + *
+       * Duration of the patch job. After the duration ends, the
+       * patch job times out.
+       * 
+ * + * .google.protobuf.Duration duration = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDurationFieldBuilder() { + if (durationBuilder_ == null) { + durationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDuration(), getParentForChildren(), isClean()); + duration_ = null; + } + return durationBuilder_; + } + + private com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + instanceDetailsSummary_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummaryOrBuilder> + instanceDetailsSummaryBuilder_; + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + * + * @return Whether the instanceDetailsSummary field is set. + */ + public boolean hasInstanceDetailsSummary() { + return instanceDetailsSummaryBuilder_ != null || instanceDetailsSummary_ != null; + } + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + * + * @return The instanceDetailsSummary. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + getInstanceDetailsSummary() { + if (instanceDetailsSummaryBuilder_ == null) { + return instanceDetailsSummary_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + .getDefaultInstance() + : instanceDetailsSummary_; + } else { + return instanceDetailsSummaryBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public Builder setInstanceDetailsSummary( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary value) { + if (instanceDetailsSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceDetailsSummary_ = value; + onChanged(); + } else { + instanceDetailsSummaryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public Builder setInstanceDetailsSummary( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.Builder + builderForValue) { + if (instanceDetailsSummaryBuilder_ == null) { + instanceDetailsSummary_ = builderForValue.build(); + onChanged(); + } else { + instanceDetailsSummaryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public Builder mergeInstanceDetailsSummary( + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary value) { + if (instanceDetailsSummaryBuilder_ == null) { + if (instanceDetailsSummary_ != null) { + instanceDetailsSummary_ = + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.newBuilder( + instanceDetailsSummary_) + .mergeFrom(value) + .buildPartial(); + } else { + instanceDetailsSummary_ = value; + } + onChanged(); + } else { + instanceDetailsSummaryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public Builder clearInstanceDetailsSummary() { + if (instanceDetailsSummaryBuilder_ == null) { + instanceDetailsSummary_ = null; + onChanged(); + } else { + instanceDetailsSummary_ = null; + instanceDetailsSummaryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.Builder + getInstanceDetailsSummaryBuilder() { + + onChanged(); + return getInstanceDetailsSummaryFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummaryOrBuilder + getInstanceDetailsSummaryOrBuilder() { + if (instanceDetailsSummaryBuilder_ != null) { + return instanceDetailsSummaryBuilder_.getMessageOrBuilder(); + } else { + return instanceDetailsSummary_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary + .getDefaultInstance() + : instanceDetailsSummary_; + } + } + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummaryOrBuilder> + getInstanceDetailsSummaryFieldBuilder() { + if (instanceDetailsSummaryBuilder_ == null) { + instanceDetailsSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummary.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchJob.InstanceDetailsSummaryOrBuilder>( + getInstanceDetailsSummary(), getParentForChildren(), isClean()); + instanceDetailsSummary_ = null; + } + return instanceDetailsSummaryBuilder_; + } + + private boolean dryRun_; + /** + * + * + *
+       * If this patch job is a dry run, the agent reports that it has
+       * finished without running any updates on the VM instance.
+       * 
+ * + * bool dry_run = 10; + * + * @return The dryRun. + */ + public boolean getDryRun() { + return dryRun_; + } + /** + * + * + *
+       * If this patch job is a dry run, the agent reports that it has
+       * finished without running any updates on the VM instance.
+       * 
+ * + * bool dry_run = 10; + * + * @param value The dryRun to set. + * @return This builder for chaining. + */ + public Builder setDryRun(boolean value) { + + dryRun_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If this patch job is a dry run, the agent reports that it has
+       * finished without running any updates on the VM instance.
+       * 
+ * + * bool dry_run = 10; + * + * @return This builder for chaining. + */ + public Builder clearDryRun() { + + dryRun_ = false; + onChanged(); + return this; + } + + private java.lang.Object errorMessage_ = ""; + /** + * + * + *
+       * If this patch job failed, this message provides information about the
+       * failure.
+       * 
+ * + * string error_message = 11; + * + * @return The errorMessage. + */ + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * If this patch job failed, this message provides information about the
+       * failure.
+       * 
+ * + * string error_message = 11; + * + * @return The bytes for errorMessage. + */ + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * If this patch job failed, this message provides information about the
+       * failure.
+       * 
+ * + * string error_message = 11; + * + * @param value The errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + errorMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If this patch job failed, this message provides information about the
+       * failure.
+       * 
+ * + * string error_message = 11; + * + * @return This builder for chaining. + */ + public Builder clearErrorMessage() { + + errorMessage_ = getDefaultInstance().getErrorMessage(); + onChanged(); + return this; + } + /** + * + * + *
+       * If this patch job failed, this message provides information about the
+       * failure.
+       * 
+ * + * string error_message = 11; + * + * @param value The bytes for errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + errorMessage_ = value; + onChanged(); + return this; + } + + private double percentComplete_; + /** + * + * + *
+       * Reflects the overall progress of the patch job in the range of
+       * 0.0 being no progress to 100.0 being complete.
+       * 
+ * + * double percent_complete = 12; + * + * @return The percentComplete. + */ + public double getPercentComplete() { + return percentComplete_; + } + /** + * + * + *
+       * Reflects the overall progress of the patch job in the range of
+       * 0.0 being no progress to 100.0 being complete.
+       * 
+ * + * double percent_complete = 12; + * + * @param value The percentComplete to set. + * @return This builder for chaining. + */ + public Builder setPercentComplete(double value) { + + percentComplete_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Reflects the overall progress of the patch job in the range of
+       * 0.0 being no progress to 100.0 being complete.
+       * 
+ * + * double percent_complete = 12; + * + * @return This builder for chaining. + */ + public Builder clearPercentComplete() { + + percentComplete_ = 0D; + onChanged(); + return this; + } + + private java.lang.Object patchDeployment_ = ""; + /** + * + * + *
+       * Output only. Name of the patch deployment that created this patch job.
+       * 
+ * + * + * string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The patchDeployment. + */ + public java.lang.String getPatchDeployment() { + java.lang.Object ref = patchDeployment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + patchDeployment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. Name of the patch deployment that created this patch job.
+       * 
+ * + * + * string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for patchDeployment. + */ + public com.google.protobuf.ByteString getPatchDeploymentBytes() { + java.lang.Object ref = patchDeployment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + patchDeployment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. Name of the patch deployment that created this patch job.
+       * 
+ * + * + * string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The patchDeployment to set. + * @return This builder for chaining. + */ + public Builder setPatchDeployment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + patchDeployment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Name of the patch deployment that created this patch job.
+       * 
+ * + * + * string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPatchDeployment() { + + patchDeployment_ = getDefaultInstance().getPatchDeployment(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Name of the patch deployment that created this patch job.
+       * 
+ * + * + * string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for patchDeployment to set. + * @return This builder for chaining. + */ + public Builder setPatchDeploymentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + patchDeployment_ = 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.osconfig.v1.PatchJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.PatchJob) + private static final com.google.cloud.osconfig.v1.PatchJobs.PatchJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.PatchJob(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PatchJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PatchJob(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.osconfig.v1.PatchJobs.PatchJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PatchConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.PatchConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Post-patch reboot settings.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The enum numeric value on the wire for rebootConfig. + */ + int getRebootConfigValue(); + /** + * + * + *
+     * Post-patch reboot settings.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The rebootConfig. + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig getRebootConfig(); + + /** + * + * + *
+     * Apt update settings. Use this setting to override the default `apt` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + * + * @return Whether the apt field is set. + */ + boolean hasApt(); + /** + * + * + *
+     * Apt update settings. Use this setting to override the default `apt` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + * + * @return The apt. + */ + com.google.cloud.osconfig.v1.PatchJobs.AptSettings getApt(); + /** + * + * + *
+     * Apt update settings. Use this setting to override the default `apt` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + */ + com.google.cloud.osconfig.v1.PatchJobs.AptSettingsOrBuilder getAptOrBuilder(); + + /** + * + * + *
+     * Yum update settings. Use this setting to override the default `yum` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + * + * @return Whether the yum field is set. + */ + boolean hasYum(); + /** + * + * + *
+     * Yum update settings. Use this setting to override the default `yum` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + * + * @return The yum. + */ + com.google.cloud.osconfig.v1.PatchJobs.YumSettings getYum(); + /** + * + * + *
+     * Yum update settings. Use this setting to override the default `yum` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + */ + com.google.cloud.osconfig.v1.PatchJobs.YumSettingsOrBuilder getYumOrBuilder(); + + /** + * + * + *
+     * Goo update settings. Use this setting to override the default `goo` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + * + * @return Whether the goo field is set. + */ + boolean hasGoo(); + /** + * + * + *
+     * Goo update settings. Use this setting to override the default `goo` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + * + * @return The goo. + */ + com.google.cloud.osconfig.v1.PatchJobs.GooSettings getGoo(); + /** + * + * + *
+     * Goo update settings. Use this setting to override the default `goo` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + */ + com.google.cloud.osconfig.v1.PatchJobs.GooSettingsOrBuilder getGooOrBuilder(); + + /** + * + * + *
+     * Zypper update settings. Use this setting to override the default `zypper`
+     * patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + * + * @return Whether the zypper field is set. + */ + boolean hasZypper(); + /** + * + * + *
+     * Zypper update settings. Use this setting to override the default `zypper`
+     * patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + * + * @return The zypper. + */ + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings getZypper(); + /** + * + * + *
+     * Zypper update settings. Use this setting to override the default `zypper`
+     * patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + */ + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettingsOrBuilder getZypperOrBuilder(); + + /** + * + * + *
+     * Windows update settings. Use this override the default windows patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + * + * @return Whether the windowsUpdate field is set. + */ + boolean hasWindowsUpdate(); + /** + * + * + *
+     * Windows update settings. Use this override the default windows patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + * + * @return The windowsUpdate. + */ + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings getWindowsUpdate(); + /** + * + * + *
+     * Windows update settings. Use this override the default windows patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + */ + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettingsOrBuilder + getWindowsUpdateOrBuilder(); + + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + * + * @return Whether the preStep field is set. + */ + boolean hasPreStep(); + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + * + * @return The preStep. + */ + com.google.cloud.osconfig.v1.PatchJobs.ExecStep getPreStep(); + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + */ + com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder getPreStepOrBuilder(); + + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + * + * @return Whether the postStep field is set. + */ + boolean hasPostStep(); + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + * + * @return The postStep. + */ + com.google.cloud.osconfig.v1.PatchJobs.ExecStep getPostStep(); + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + */ + com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder getPostStepOrBuilder(); + } + /** + * + * + *
+   * Patch configuration specifications. Contains details on how to apply the
+   * patch(es) to a VM instance.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchConfig} + */ + public static final class PatchConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.PatchConfig) + PatchConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PatchConfig.newBuilder() to construct. + private PatchConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PatchConfig() { + rebootConfig_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PatchConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PatchConfig( + 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(); + + rebootConfig_ = rawValue; + break; + } + case 26: + { + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Builder subBuilder = null; + if (apt_ != null) { + subBuilder = apt_.toBuilder(); + } + apt_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(apt_); + apt_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.osconfig.v1.PatchJobs.YumSettings.Builder subBuilder = null; + if (yum_ != null) { + subBuilder = yum_.toBuilder(); + } + yum_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.YumSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(yum_); + yum_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.osconfig.v1.PatchJobs.GooSettings.Builder subBuilder = null; + if (goo_ != null) { + subBuilder = goo_.toBuilder(); + } + goo_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.GooSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(goo_); + goo_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.Builder subBuilder = null; + if (zypper_ != null) { + subBuilder = zypper_.toBuilder(); + } + zypper_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(zypper_); + zypper_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Builder subBuilder = + null; + if (windowsUpdate_ != null) { + subBuilder = windowsUpdate_.toBuilder(); + } + windowsUpdate_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(windowsUpdate_); + windowsUpdate_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder subBuilder = null; + if (preStep_ != null) { + subBuilder = preStep_.toBuilder(); + } + preStep_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(preStep_); + preStep_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder subBuilder = null; + if (postStep_ != null) { + subBuilder = postStep_.toBuilder(); + } + postStep_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(postStep_); + postStep_ = 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder.class); + } + + /** + * + * + *
+     * Post-patch reboot settings.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1.PatchConfig.RebootConfig} + */ + public enum RebootConfig implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The default behavior is DEFAULT.
+       * 
+ * + * REBOOT_CONFIG_UNSPECIFIED = 0; + */ + REBOOT_CONFIG_UNSPECIFIED(0), + /** + * + * + *
+       * The agent decides if a reboot is necessary by checking signals such as
+       * registry keys on Windows or `/var/run/reboot-required` on APT based
+       * systems. On RPM based systems, a set of core system package install times
+       * are compared with system boot time.
+       * 
+ * + * DEFAULT = 1; + */ + DEFAULT(1), + /** + * + * + *
+       * Always reboot the machine after the update completes.
+       * 
+ * + * ALWAYS = 2; + */ + ALWAYS(2), + /** + * + * + *
+       * Never reboot the machine after the update completes.
+       * 
+ * + * NEVER = 3; + */ + NEVER(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The default behavior is DEFAULT.
+       * 
+ * + * REBOOT_CONFIG_UNSPECIFIED = 0; + */ + public static final int REBOOT_CONFIG_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The agent decides if a reboot is necessary by checking signals such as
+       * registry keys on Windows or `/var/run/reboot-required` on APT based
+       * systems. On RPM based systems, a set of core system package install times
+       * are compared with system boot time.
+       * 
+ * + * DEFAULT = 1; + */ + public static final int DEFAULT_VALUE = 1; + /** + * + * + *
+       * Always reboot the machine after the update completes.
+       * 
+ * + * ALWAYS = 2; + */ + public static final int ALWAYS_VALUE = 2; + /** + * + * + *
+       * Never reboot the machine after the update completes.
+       * 
+ * + * NEVER = 3; + */ + public static final int NEVER_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RebootConfig 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 RebootConfig forNumber(int value) { + switch (value) { + case 0: + return REBOOT_CONFIG_UNSPECIFIED; + case 1: + return DEFAULT; + case 2: + return ALWAYS; + case 3: + return NEVER; + 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 RebootConfig findValueByNumber(int number) { + return RebootConfig.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.osconfig.v1.PatchJobs.PatchConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RebootConfig[] VALUES = values(); + + public static RebootConfig 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 RebootConfig(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1.PatchConfig.RebootConfig) + } + + public static final int REBOOT_CONFIG_FIELD_NUMBER = 1; + private int rebootConfig_; + /** + * + * + *
+     * Post-patch reboot settings.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The enum numeric value on the wire for rebootConfig. + */ + public int getRebootConfigValue() { + return rebootConfig_; + } + /** + * + * + *
+     * Post-patch reboot settings.
+     * 
+ * + * .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The rebootConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig getRebootConfig() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig result = + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig.valueOf(rebootConfig_); + return result == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig.UNRECOGNIZED + : result; + } + + public static final int APT_FIELD_NUMBER = 3; + private com.google.cloud.osconfig.v1.PatchJobs.AptSettings apt_; + /** + * + * + *
+     * Apt update settings. Use this setting to override the default `apt` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + * + * @return Whether the apt field is set. + */ + public boolean hasApt() { + return apt_ != null; + } + /** + * + * + *
+     * Apt update settings. Use this setting to override the default `apt` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + * + * @return The apt. + */ + public com.google.cloud.osconfig.v1.PatchJobs.AptSettings getApt() { + return apt_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.AptSettings.getDefaultInstance() + : apt_; + } + /** + * + * + *
+     * Apt update settings. Use this setting to override the default `apt` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + */ + public com.google.cloud.osconfig.v1.PatchJobs.AptSettingsOrBuilder getAptOrBuilder() { + return getApt(); + } + + public static final int YUM_FIELD_NUMBER = 4; + private com.google.cloud.osconfig.v1.PatchJobs.YumSettings yum_; + /** + * + * + *
+     * Yum update settings. Use this setting to override the default `yum` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + * + * @return Whether the yum field is set. + */ + public boolean hasYum() { + return yum_ != null; + } + /** + * + * + *
+     * Yum update settings. Use this setting to override the default `yum` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + * + * @return The yum. + */ + public com.google.cloud.osconfig.v1.PatchJobs.YumSettings getYum() { + return yum_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.YumSettings.getDefaultInstance() + : yum_; + } + /** + * + * + *
+     * Yum update settings. Use this setting to override the default `yum` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + */ + public com.google.cloud.osconfig.v1.PatchJobs.YumSettingsOrBuilder getYumOrBuilder() { + return getYum(); + } + + public static final int GOO_FIELD_NUMBER = 5; + private com.google.cloud.osconfig.v1.PatchJobs.GooSettings goo_; + /** + * + * + *
+     * Goo update settings. Use this setting to override the default `goo` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + * + * @return Whether the goo field is set. + */ + public boolean hasGoo() { + return goo_ != null; + } + /** + * + * + *
+     * Goo update settings. Use this setting to override the default `goo` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + * + * @return The goo. + */ + public com.google.cloud.osconfig.v1.PatchJobs.GooSettings getGoo() { + return goo_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.GooSettings.getDefaultInstance() + : goo_; + } + /** + * + * + *
+     * Goo update settings. Use this setting to override the default `goo` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + */ + public com.google.cloud.osconfig.v1.PatchJobs.GooSettingsOrBuilder getGooOrBuilder() { + return getGoo(); + } + + public static final int ZYPPER_FIELD_NUMBER = 6; + private com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings zypper_; + /** + * + * + *
+     * Zypper update settings. Use this setting to override the default `zypper`
+     * patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + * + * @return Whether the zypper field is set. + */ + public boolean hasZypper() { + return zypper_ != null; + } + /** + * + * + *
+     * Zypper update settings. Use this setting to override the default `zypper`
+     * patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + * + * @return The zypper. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings getZypper() { + return zypper_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.getDefaultInstance() + : zypper_; + } + /** + * + * + *
+     * Zypper update settings. Use this setting to override the default `zypper`
+     * patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ZypperSettingsOrBuilder getZypperOrBuilder() { + return getZypper(); + } + + public static final int WINDOWS_UPDATE_FIELD_NUMBER = 7; + private com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings windowsUpdate_; + /** + * + * + *
+     * Windows update settings. Use this override the default windows patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + * + * @return Whether the windowsUpdate field is set. + */ + public boolean hasWindowsUpdate() { + return windowsUpdate_ != null; + } + /** + * + * + *
+     * Windows update settings. Use this override the default windows patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + * + * @return The windowsUpdate. + */ + public com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings getWindowsUpdate() { + return windowsUpdate_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.getDefaultInstance() + : windowsUpdate_; + } + /** + * + * + *
+     * Windows update settings. Use this override the default windows patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + */ + public com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettingsOrBuilder + getWindowsUpdateOrBuilder() { + return getWindowsUpdate(); + } + + public static final int PRE_STEP_FIELD_NUMBER = 8; + private com.google.cloud.osconfig.v1.PatchJobs.ExecStep preStep_; + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + * + * @return Whether the preStep field is set. + */ + public boolean hasPreStep() { + return preStep_ != null; + } + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + * + * @return The preStep. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStep getPreStep() { + return preStep_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStep.getDefaultInstance() + : preStep_; + } + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder getPreStepOrBuilder() { + return getPreStep(); + } + + public static final int POST_STEP_FIELD_NUMBER = 9; + private com.google.cloud.osconfig.v1.PatchJobs.ExecStep postStep_; + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + * + * @return Whether the postStep field is set. + */ + public boolean hasPostStep() { + return postStep_ != null; + } + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + * + * @return The postStep. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStep getPostStep() { + return postStep_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStep.getDefaultInstance() + : postStep_; + } + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder getPostStepOrBuilder() { + return getPostStep(); + } + + 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 (rebootConfig_ + != com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig + .REBOOT_CONFIG_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, rebootConfig_); + } + if (apt_ != null) { + output.writeMessage(3, getApt()); + } + if (yum_ != null) { + output.writeMessage(4, getYum()); + } + if (goo_ != null) { + output.writeMessage(5, getGoo()); + } + if (zypper_ != null) { + output.writeMessage(6, getZypper()); + } + if (windowsUpdate_ != null) { + output.writeMessage(7, getWindowsUpdate()); + } + if (preStep_ != null) { + output.writeMessage(8, getPreStep()); + } + if (postStep_ != null) { + output.writeMessage(9, getPostStep()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rebootConfig_ + != com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig + .REBOOT_CONFIG_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, rebootConfig_); + } + if (apt_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getApt()); + } + if (yum_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getYum()); + } + if (goo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getGoo()); + } + if (zypper_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getZypper()); + } + if (windowsUpdate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getWindowsUpdate()); + } + if (preStep_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPreStep()); + } + if (postStep_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getPostStep()); + } + 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.osconfig.v1.PatchJobs.PatchConfig)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig other = + (com.google.cloud.osconfig.v1.PatchJobs.PatchConfig) obj; + + if (rebootConfig_ != other.rebootConfig_) return false; + if (hasApt() != other.hasApt()) return false; + if (hasApt()) { + if (!getApt().equals(other.getApt())) return false; + } + if (hasYum() != other.hasYum()) return false; + if (hasYum()) { + if (!getYum().equals(other.getYum())) return false; + } + if (hasGoo() != other.hasGoo()) return false; + if (hasGoo()) { + if (!getGoo().equals(other.getGoo())) return false; + } + if (hasZypper() != other.hasZypper()) return false; + if (hasZypper()) { + if (!getZypper().equals(other.getZypper())) return false; + } + if (hasWindowsUpdate() != other.hasWindowsUpdate()) return false; + if (hasWindowsUpdate()) { + if (!getWindowsUpdate().equals(other.getWindowsUpdate())) return false; + } + if (hasPreStep() != other.hasPreStep()) return false; + if (hasPreStep()) { + if (!getPreStep().equals(other.getPreStep())) return false; + } + if (hasPostStep() != other.hasPostStep()) return false; + if (hasPostStep()) { + if (!getPostStep().equals(other.getPostStep())) 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) + REBOOT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + rebootConfig_; + if (hasApt()) { + hash = (37 * hash) + APT_FIELD_NUMBER; + hash = (53 * hash) + getApt().hashCode(); + } + if (hasYum()) { + hash = (37 * hash) + YUM_FIELD_NUMBER; + hash = (53 * hash) + getYum().hashCode(); + } + if (hasGoo()) { + hash = (37 * hash) + GOO_FIELD_NUMBER; + hash = (53 * hash) + getGoo().hashCode(); + } + if (hasZypper()) { + hash = (37 * hash) + ZYPPER_FIELD_NUMBER; + hash = (53 * hash) + getZypper().hashCode(); + } + if (hasWindowsUpdate()) { + hash = (37 * hash) + WINDOWS_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getWindowsUpdate().hashCode(); + } + if (hasPreStep()) { + hash = (37 * hash) + PRE_STEP_FIELD_NUMBER; + hash = (53 * hash) + getPreStep().hashCode(); + } + if (hasPostStep()) { + hash = (37 * hash) + POST_STEP_FIELD_NUMBER; + hash = (53 * hash) + getPostStep().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchConfig 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.osconfig.v1.PatchJobs.PatchConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchConfig 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.osconfig.v1.PatchJobs.PatchConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchConfig 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.osconfig.v1.PatchJobs.PatchConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchConfig 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.osconfig.v1.PatchJobs.PatchConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchConfig 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.osconfig.v1.PatchJobs.PatchConfig 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; + } + /** + * + * + *
+     * Patch configuration specifications. Contains details on how to apply the
+     * patch(es) to a VM instance.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.PatchConfig) + com.google.cloud.osconfig.v1.PatchJobs.PatchConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.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(); + rebootConfig_ = 0; + + if (aptBuilder_ == null) { + apt_ = null; + } else { + apt_ = null; + aptBuilder_ = null; + } + if (yumBuilder_ == null) { + yum_ = null; + } else { + yum_ = null; + yumBuilder_ = null; + } + if (gooBuilder_ == null) { + goo_ = null; + } else { + goo_ = null; + gooBuilder_ = null; + } + if (zypperBuilder_ == null) { + zypper_ = null; + } else { + zypper_ = null; + zypperBuilder_ = null; + } + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = null; + } else { + windowsUpdate_ = null; + windowsUpdateBuilder_ = null; + } + if (preStepBuilder_ == null) { + preStep_ = null; + } else { + preStep_ = null; + preStepBuilder_ = null; + } + if (postStepBuilder_ == null) { + postStep_ = null; + } else { + postStep_ = null; + postStepBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig build() { + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig result = + new com.google.cloud.osconfig.v1.PatchJobs.PatchConfig(this); + result.rebootConfig_ = rebootConfig_; + if (aptBuilder_ == null) { + result.apt_ = apt_; + } else { + result.apt_ = aptBuilder_.build(); + } + if (yumBuilder_ == null) { + result.yum_ = yum_; + } else { + result.yum_ = yumBuilder_.build(); + } + if (gooBuilder_ == null) { + result.goo_ = goo_; + } else { + result.goo_ = gooBuilder_.build(); + } + if (zypperBuilder_ == null) { + result.zypper_ = zypper_; + } else { + result.zypper_ = zypperBuilder_.build(); + } + if (windowsUpdateBuilder_ == null) { + result.windowsUpdate_ = windowsUpdate_; + } else { + result.windowsUpdate_ = windowsUpdateBuilder_.build(); + } + if (preStepBuilder_ == null) { + result.preStep_ = preStep_; + } else { + result.preStep_ = preStepBuilder_.build(); + } + if (postStepBuilder_ == null) { + result.postStep_ = postStep_; + } else { + result.postStep_ = postStepBuilder_.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.osconfig.v1.PatchJobs.PatchConfig) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.PatchConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.PatchConfig other) { + if (other == com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.getDefaultInstance()) + return this; + if (other.rebootConfig_ != 0) { + setRebootConfigValue(other.getRebootConfigValue()); + } + if (other.hasApt()) { + mergeApt(other.getApt()); + } + if (other.hasYum()) { + mergeYum(other.getYum()); + } + if (other.hasGoo()) { + mergeGoo(other.getGoo()); + } + if (other.hasZypper()) { + mergeZypper(other.getZypper()); + } + if (other.hasWindowsUpdate()) { + mergeWindowsUpdate(other.getWindowsUpdate()); + } + if (other.hasPreStep()) { + mergePreStep(other.getPreStep()); + } + if (other.hasPostStep()) { + mergePostStep(other.getPostStep()); + } + 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.osconfig.v1.PatchJobs.PatchConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.PatchConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int rebootConfig_ = 0; + /** + * + * + *
+       * Post-patch reboot settings.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The enum numeric value on the wire for rebootConfig. + */ + public int getRebootConfigValue() { + return rebootConfig_; + } + /** + * + * + *
+       * Post-patch reboot settings.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + * + * @param value The enum numeric value on the wire for rebootConfig to set. + * @return This builder for chaining. + */ + public Builder setRebootConfigValue(int value) { + rebootConfig_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Post-patch reboot settings.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The rebootConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig getRebootConfig() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig result = + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig.valueOf(rebootConfig_); + return result == null + ? com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Post-patch reboot settings.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + * + * @param value The rebootConfig to set. + * @return This builder for chaining. + */ + public Builder setRebootConfig( + com.google.cloud.osconfig.v1.PatchJobs.PatchConfig.RebootConfig value) { + if (value == null) { + throw new NullPointerException(); + } + + rebootConfig_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Post-patch reboot settings.
+       * 
+ * + * .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + * + * @return This builder for chaining. + */ + public Builder clearRebootConfig() { + + rebootConfig_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1.PatchJobs.AptSettings apt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.AptSettings, + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.AptSettingsOrBuilder> + aptBuilder_; + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + * + * @return Whether the apt field is set. + */ + public boolean hasApt() { + return aptBuilder_ != null || apt_ != null; + } + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + * + * @return The apt. + */ + public com.google.cloud.osconfig.v1.PatchJobs.AptSettings getApt() { + if (aptBuilder_ == null) { + return apt_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.AptSettings.getDefaultInstance() + : apt_; + } else { + return aptBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + */ + public Builder setApt(com.google.cloud.osconfig.v1.PatchJobs.AptSettings value) { + if (aptBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apt_ = value; + onChanged(); + } else { + aptBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + */ + public Builder setApt( + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Builder builderForValue) { + if (aptBuilder_ == null) { + apt_ = builderForValue.build(); + onChanged(); + } else { + aptBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + */ + public Builder mergeApt(com.google.cloud.osconfig.v1.PatchJobs.AptSettings value) { + if (aptBuilder_ == null) { + if (apt_ != null) { + apt_ = + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.newBuilder(apt_) + .mergeFrom(value) + .buildPartial(); + } else { + apt_ = value; + } + onChanged(); + } else { + aptBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + */ + public Builder clearApt() { + if (aptBuilder_ == null) { + apt_ = null; + onChanged(); + } else { + apt_ = null; + aptBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + */ + public com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Builder getAptBuilder() { + + onChanged(); + return getAptFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + */ + public com.google.cloud.osconfig.v1.PatchJobs.AptSettingsOrBuilder getAptOrBuilder() { + if (aptBuilder_ != null) { + return aptBuilder_.getMessageOrBuilder(); + } else { + return apt_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.AptSettings.getDefaultInstance() + : apt_; + } + } + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings apt = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.AptSettings, + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.AptSettingsOrBuilder> + getAptFieldBuilder() { + if (aptBuilder_ == null) { + aptBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.AptSettings, + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.AptSettingsOrBuilder>( + getApt(), getParentForChildren(), isClean()); + apt_ = null; + } + return aptBuilder_; + } + + private com.google.cloud.osconfig.v1.PatchJobs.YumSettings yum_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.YumSettings, + com.google.cloud.osconfig.v1.PatchJobs.YumSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.YumSettingsOrBuilder> + yumBuilder_; + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + * + * @return Whether the yum field is set. + */ + public boolean hasYum() { + return yumBuilder_ != null || yum_ != null; + } + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + * + * @return The yum. + */ + public com.google.cloud.osconfig.v1.PatchJobs.YumSettings getYum() { + if (yumBuilder_ == null) { + return yum_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.YumSettings.getDefaultInstance() + : yum_; + } else { + return yumBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + */ + public Builder setYum(com.google.cloud.osconfig.v1.PatchJobs.YumSettings value) { + if (yumBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + yum_ = value; + onChanged(); + } else { + yumBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + */ + public Builder setYum( + com.google.cloud.osconfig.v1.PatchJobs.YumSettings.Builder builderForValue) { + if (yumBuilder_ == null) { + yum_ = builderForValue.build(); + onChanged(); + } else { + yumBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + */ + public Builder mergeYum(com.google.cloud.osconfig.v1.PatchJobs.YumSettings value) { + if (yumBuilder_ == null) { + if (yum_ != null) { + yum_ = + com.google.cloud.osconfig.v1.PatchJobs.YumSettings.newBuilder(yum_) + .mergeFrom(value) + .buildPartial(); + } else { + yum_ = value; + } + onChanged(); + } else { + yumBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + */ + public Builder clearYum() { + if (yumBuilder_ == null) { + yum_ = null; + onChanged(); + } else { + yum_ = null; + yumBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + */ + public com.google.cloud.osconfig.v1.PatchJobs.YumSettings.Builder getYumBuilder() { + + onChanged(); + return getYumFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + */ + public com.google.cloud.osconfig.v1.PatchJobs.YumSettingsOrBuilder getYumOrBuilder() { + if (yumBuilder_ != null) { + return yumBuilder_.getMessageOrBuilder(); + } else { + return yum_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.YumSettings.getDefaultInstance() + : yum_; + } + } + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.YumSettings yum = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.YumSettings, + com.google.cloud.osconfig.v1.PatchJobs.YumSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.YumSettingsOrBuilder> + getYumFieldBuilder() { + if (yumBuilder_ == null) { + yumBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.YumSettings, + com.google.cloud.osconfig.v1.PatchJobs.YumSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.YumSettingsOrBuilder>( + getYum(), getParentForChildren(), isClean()); + yum_ = null; + } + return yumBuilder_; + } + + private com.google.cloud.osconfig.v1.PatchJobs.GooSettings goo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.GooSettings, + com.google.cloud.osconfig.v1.PatchJobs.GooSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.GooSettingsOrBuilder> + gooBuilder_; + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + * + * @return Whether the goo field is set. + */ + public boolean hasGoo() { + return gooBuilder_ != null || goo_ != null; + } + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + * + * @return The goo. + */ + public com.google.cloud.osconfig.v1.PatchJobs.GooSettings getGoo() { + if (gooBuilder_ == null) { + return goo_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.GooSettings.getDefaultInstance() + : goo_; + } else { + return gooBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + */ + public Builder setGoo(com.google.cloud.osconfig.v1.PatchJobs.GooSettings value) { + if (gooBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + goo_ = value; + onChanged(); + } else { + gooBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + */ + public Builder setGoo( + com.google.cloud.osconfig.v1.PatchJobs.GooSettings.Builder builderForValue) { + if (gooBuilder_ == null) { + goo_ = builderForValue.build(); + onChanged(); + } else { + gooBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + */ + public Builder mergeGoo(com.google.cloud.osconfig.v1.PatchJobs.GooSettings value) { + if (gooBuilder_ == null) { + if (goo_ != null) { + goo_ = + com.google.cloud.osconfig.v1.PatchJobs.GooSettings.newBuilder(goo_) + .mergeFrom(value) + .buildPartial(); + } else { + goo_ = value; + } + onChanged(); + } else { + gooBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + */ + public Builder clearGoo() { + if (gooBuilder_ == null) { + goo_ = null; + onChanged(); + } else { + goo_ = null; + gooBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + */ + public com.google.cloud.osconfig.v1.PatchJobs.GooSettings.Builder getGooBuilder() { + + onChanged(); + return getGooFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + */ + public com.google.cloud.osconfig.v1.PatchJobs.GooSettingsOrBuilder getGooOrBuilder() { + if (gooBuilder_ != null) { + return gooBuilder_.getMessageOrBuilder(); + } else { + return goo_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.GooSettings.getDefaultInstance() + : goo_; + } + } + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1.GooSettings goo = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.GooSettings, + com.google.cloud.osconfig.v1.PatchJobs.GooSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.GooSettingsOrBuilder> + getGooFieldBuilder() { + if (gooBuilder_ == null) { + gooBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.GooSettings, + com.google.cloud.osconfig.v1.PatchJobs.GooSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.GooSettingsOrBuilder>( + getGoo(), getParentForChildren(), isClean()); + goo_ = null; + } + return gooBuilder_; + } + + private com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings zypper_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings, + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettingsOrBuilder> + zypperBuilder_; + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + * + * @return Whether the zypper field is set. + */ + public boolean hasZypper() { + return zypperBuilder_ != null || zypper_ != null; + } + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + * + * @return The zypper. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings getZypper() { + if (zypperBuilder_ == null) { + return zypper_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.getDefaultInstance() + : zypper_; + } else { + return zypperBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + */ + public Builder setZypper(com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings value) { + if (zypperBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + zypper_ = value; + onChanged(); + } else { + zypperBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + */ + public Builder setZypper( + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.Builder builderForValue) { + if (zypperBuilder_ == null) { + zypper_ = builderForValue.build(); + onChanged(); + } else { + zypperBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + */ + public Builder mergeZypper(com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings value) { + if (zypperBuilder_ == null) { + if (zypper_ != null) { + zypper_ = + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.newBuilder(zypper_) + .mergeFrom(value) + .buildPartial(); + } else { + zypper_ = value; + } + onChanged(); + } else { + zypperBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + */ + public Builder clearZypper() { + if (zypperBuilder_ == null) { + zypper_ = null; + onChanged(); + } else { + zypper_ = null; + zypperBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.Builder getZypperBuilder() { + + onChanged(); + return getZypperFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ZypperSettingsOrBuilder getZypperOrBuilder() { + if (zypperBuilder_ != null) { + return zypperBuilder_.getMessageOrBuilder(); + } else { + return zypper_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.getDefaultInstance() + : zypper_; + } + } + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings, + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettingsOrBuilder> + getZypperFieldBuilder() { + if (zypperBuilder_ == null) { + zypperBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings, + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettingsOrBuilder>( + getZypper(), getParentForChildren(), isClean()); + zypper_ = null; + } + return zypperBuilder_; + } + + private com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings windowsUpdate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettingsOrBuilder> + windowsUpdateBuilder_; + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + * + * @return Whether the windowsUpdate field is set. + */ + public boolean hasWindowsUpdate() { + return windowsUpdateBuilder_ != null || windowsUpdate_ != null; + } + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + * + * @return The windowsUpdate. + */ + public com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings getWindowsUpdate() { + if (windowsUpdateBuilder_ == null) { + return windowsUpdate_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.getDefaultInstance() + : windowsUpdate_; + } else { + return windowsUpdateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + */ + public Builder setWindowsUpdate( + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings value) { + if (windowsUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + windowsUpdate_ = value; + onChanged(); + } else { + windowsUpdateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + */ + public Builder setWindowsUpdate( + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Builder builderForValue) { + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = builderForValue.build(); + onChanged(); + } else { + windowsUpdateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + */ + public Builder mergeWindowsUpdate( + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings value) { + if (windowsUpdateBuilder_ == null) { + if (windowsUpdate_ != null) { + windowsUpdate_ = + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.newBuilder( + windowsUpdate_) + .mergeFrom(value) + .buildPartial(); + } else { + windowsUpdate_ = value; + } + onChanged(); + } else { + windowsUpdateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + */ + public Builder clearWindowsUpdate() { + if (windowsUpdateBuilder_ == null) { + windowsUpdate_ = null; + onChanged(); + } else { + windowsUpdate_ = null; + windowsUpdateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + */ + public com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Builder + getWindowsUpdateBuilder() { + + onChanged(); + return getWindowsUpdateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + */ + public com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettingsOrBuilder + getWindowsUpdateOrBuilder() { + if (windowsUpdateBuilder_ != null) { + return windowsUpdateBuilder_.getMessageOrBuilder(); + } else { + return windowsUpdate_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.getDefaultInstance() + : windowsUpdate_; + } + } + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettingsOrBuilder> + getWindowsUpdateFieldBuilder() { + if (windowsUpdateBuilder_ == null) { + windowsUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Builder, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettingsOrBuilder>( + getWindowsUpdate(), getParentForChildren(), isClean()); + windowsUpdate_ = null; + } + return windowsUpdateBuilder_; + } + + private com.google.cloud.osconfig.v1.PatchJobs.ExecStep preStep_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder> + preStepBuilder_; + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + * + * @return Whether the preStep field is set. + */ + public boolean hasPreStep() { + return preStepBuilder_ != null || preStep_ != null; + } + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + * + * @return The preStep. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStep getPreStep() { + if (preStepBuilder_ == null) { + return preStep_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStep.getDefaultInstance() + : preStep_; + } else { + return preStepBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + */ + public Builder setPreStep(com.google.cloud.osconfig.v1.PatchJobs.ExecStep value) { + if (preStepBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + preStep_ = value; + onChanged(); + } else { + preStepBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + */ + public Builder setPreStep( + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder builderForValue) { + if (preStepBuilder_ == null) { + preStep_ = builderForValue.build(); + onChanged(); + } else { + preStepBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + */ + public Builder mergePreStep(com.google.cloud.osconfig.v1.PatchJobs.ExecStep value) { + if (preStepBuilder_ == null) { + if (preStep_ != null) { + preStep_ = + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.newBuilder(preStep_) + .mergeFrom(value) + .buildPartial(); + } else { + preStep_ = value; + } + onChanged(); + } else { + preStepBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + */ + public Builder clearPreStep() { + if (preStepBuilder_ == null) { + preStep_ = null; + onChanged(); + } else { + preStep_ = null; + preStepBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder getPreStepBuilder() { + + onChanged(); + return getPreStepFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder getPreStepOrBuilder() { + if (preStepBuilder_ != null) { + return preStepBuilder_.getMessageOrBuilder(); + } else { + return preStep_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStep.getDefaultInstance() + : preStep_; + } + } + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep pre_step = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder> + getPreStepFieldBuilder() { + if (preStepBuilder_ == null) { + preStepBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder>( + getPreStep(), getParentForChildren(), isClean()); + preStep_ = null; + } + return preStepBuilder_; + } + + private com.google.cloud.osconfig.v1.PatchJobs.ExecStep postStep_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder> + postStepBuilder_; + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + * + * @return Whether the postStep field is set. + */ + public boolean hasPostStep() { + return postStepBuilder_ != null || postStep_ != null; + } + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + * + * @return The postStep. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStep getPostStep() { + if (postStepBuilder_ == null) { + return postStep_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStep.getDefaultInstance() + : postStep_; + } else { + return postStepBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + */ + public Builder setPostStep(com.google.cloud.osconfig.v1.PatchJobs.ExecStep value) { + if (postStepBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postStep_ = value; + onChanged(); + } else { + postStepBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + */ + public Builder setPostStep( + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder builderForValue) { + if (postStepBuilder_ == null) { + postStep_ = builderForValue.build(); + onChanged(); + } else { + postStepBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + */ + public Builder mergePostStep(com.google.cloud.osconfig.v1.PatchJobs.ExecStep value) { + if (postStepBuilder_ == null) { + if (postStep_ != null) { + postStep_ = + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.newBuilder(postStep_) + .mergeFrom(value) + .buildPartial(); + } else { + postStep_ = value; + } + onChanged(); + } else { + postStepBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + */ + public Builder clearPostStep() { + if (postStepBuilder_ == null) { + postStep_ = null; + onChanged(); + } else { + postStep_ = null; + postStepBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder getPostStepBuilder() { + + onChanged(); + return getPostStepFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder getPostStepOrBuilder() { + if (postStepBuilder_ != null) { + return postStepBuilder_.getMessageOrBuilder(); + } else { + return postStep_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStep.getDefaultInstance() + : postStep_; + } + } + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStep post_step = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder> + getPostStepFieldBuilder() { + if (postStepBuilder_ == null) { + postStepBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder>( + getPostStep(), getParentForChildren(), isClean()); + postStep_ = null; + } + return postStepBuilder_; + } + + @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.osconfig.v1.PatchConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.PatchConfig) + private static final com.google.cloud.osconfig.v1.PatchJobs.PatchConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.PatchConfig(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PatchConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PatchConfig(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.osconfig.v1.PatchJobs.PatchConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.Instance) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Namespace for instance state enums.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.Instance} + */ + public static final class Instance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.Instance) + InstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Instance.newBuilder() to construct. + private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instance() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Instance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Instance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_Instance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.Instance.class, + com.google.cloud.osconfig.v1.PatchJobs.Instance.Builder.class); + } + + /** + * + * + *
+     * Patch state of an instance.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1.Instance.PatchState} + */ + public enum PatchState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * PATCH_STATE_UNSPECIFIED = 0; + */ + PATCH_STATE_UNSPECIFIED(0), + /** + * + * + *
+       * The instance is not yet notified.
+       * 
+ * + * PENDING = 1; + */ + PENDING(1), + /** + * + * + *
+       * Instance is inactive and cannot be patched.
+       * 
+ * + * INACTIVE = 2; + */ + INACTIVE(2), + /** + * + * + *
+       * The instance is notified that it should be patched.
+       * 
+ * + * NOTIFIED = 3; + */ + NOTIFIED(3), + /** + * + * + *
+       * The instance has started the patching process.
+       * 
+ * + * STARTED = 4; + */ + STARTED(4), + /** + * + * + *
+       * The instance is downloading patches.
+       * 
+ * + * DOWNLOADING_PATCHES = 5; + */ + DOWNLOADING_PATCHES(5), + /** + * + * + *
+       * The instance is applying patches.
+       * 
+ * + * APPLYING_PATCHES = 6; + */ + APPLYING_PATCHES(6), + /** + * + * + *
+       * The instance is rebooting.
+       * 
+ * + * REBOOTING = 7; + */ + REBOOTING(7), + /** + * + * + *
+       * The instance has completed applying patches.
+       * 
+ * + * SUCCEEDED = 8; + */ + SUCCEEDED(8), + /** + * + * + *
+       * The instance has completed applying patches but a reboot is required.
+       * 
+ * + * SUCCEEDED_REBOOT_REQUIRED = 9; + */ + SUCCEEDED_REBOOT_REQUIRED(9), + /** + * + * + *
+       * The instance has failed to apply the patch.
+       * 
+ * + * FAILED = 10; + */ + FAILED(10), + /** + * + * + *
+       * The instance acked the notification and will start shortly.
+       * 
+ * + * ACKED = 11; + */ + ACKED(11), + /** + * + * + *
+       * The instance exceeded the time out while applying the patch.
+       * 
+ * + * TIMED_OUT = 12; + */ + TIMED_OUT(12), + /** + * + * + *
+       * The instance is running the pre-patch step.
+       * 
+ * + * RUNNING_PRE_PATCH_STEP = 13; + */ + RUNNING_PRE_PATCH_STEP(13), + /** + * + * + *
+       * The instance is running the post-patch step.
+       * 
+ * + * RUNNING_POST_PATCH_STEP = 14; + */ + RUNNING_POST_PATCH_STEP(14), + /** + * + * + *
+       * The service could not detect the presence of the agent. Check to ensure
+       * that the agent is installed, running, and able to communicate with the
+       * service.
+       * 
+ * + * NO_AGENT_DETECTED = 15; + */ + NO_AGENT_DETECTED(15), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * PATCH_STATE_UNSPECIFIED = 0; + */ + public static final int PATCH_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The instance is not yet notified.
+       * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + * + * + *
+       * Instance is inactive and cannot be patched.
+       * 
+ * + * INACTIVE = 2; + */ + public static final int INACTIVE_VALUE = 2; + /** + * + * + *
+       * The instance is notified that it should be patched.
+       * 
+ * + * NOTIFIED = 3; + */ + public static final int NOTIFIED_VALUE = 3; + /** + * + * + *
+       * The instance has started the patching process.
+       * 
+ * + * STARTED = 4; + */ + public static final int STARTED_VALUE = 4; + /** + * + * + *
+       * The instance is downloading patches.
+       * 
+ * + * DOWNLOADING_PATCHES = 5; + */ + public static final int DOWNLOADING_PATCHES_VALUE = 5; + /** + * + * + *
+       * The instance is applying patches.
+       * 
+ * + * APPLYING_PATCHES = 6; + */ + public static final int APPLYING_PATCHES_VALUE = 6; + /** + * + * + *
+       * The instance is rebooting.
+       * 
+ * + * REBOOTING = 7; + */ + public static final int REBOOTING_VALUE = 7; + /** + * + * + *
+       * The instance has completed applying patches.
+       * 
+ * + * SUCCEEDED = 8; + */ + public static final int SUCCEEDED_VALUE = 8; + /** + * + * + *
+       * The instance has completed applying patches but a reboot is required.
+       * 
+ * + * SUCCEEDED_REBOOT_REQUIRED = 9; + */ + public static final int SUCCEEDED_REBOOT_REQUIRED_VALUE = 9; + /** + * + * + *
+       * The instance has failed to apply the patch.
+       * 
+ * + * FAILED = 10; + */ + public static final int FAILED_VALUE = 10; + /** + * + * + *
+       * The instance acked the notification and will start shortly.
+       * 
+ * + * ACKED = 11; + */ + public static final int ACKED_VALUE = 11; + /** + * + * + *
+       * The instance exceeded the time out while applying the patch.
+       * 
+ * + * TIMED_OUT = 12; + */ + public static final int TIMED_OUT_VALUE = 12; + /** + * + * + *
+       * The instance is running the pre-patch step.
+       * 
+ * + * RUNNING_PRE_PATCH_STEP = 13; + */ + public static final int RUNNING_PRE_PATCH_STEP_VALUE = 13; + /** + * + * + *
+       * The instance is running the post-patch step.
+       * 
+ * + * RUNNING_POST_PATCH_STEP = 14; + */ + public static final int RUNNING_POST_PATCH_STEP_VALUE = 14; + /** + * + * + *
+       * The service could not detect the presence of the agent. Check to ensure
+       * that the agent is installed, running, and able to communicate with the
+       * service.
+       * 
+ * + * NO_AGENT_DETECTED = 15; + */ + public static final int NO_AGENT_DETECTED_VALUE = 15; + + 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 PatchState 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 PatchState forNumber(int value) { + switch (value) { + case 0: + return PATCH_STATE_UNSPECIFIED; + case 1: + return PENDING; + case 2: + return INACTIVE; + case 3: + return NOTIFIED; + case 4: + return STARTED; + case 5: + return DOWNLOADING_PATCHES; + case 6: + return APPLYING_PATCHES; + case 7: + return REBOOTING; + case 8: + return SUCCEEDED; + case 9: + return SUCCEEDED_REBOOT_REQUIRED; + case 10: + return FAILED; + case 11: + return ACKED; + case 12: + return TIMED_OUT; + case 13: + return RUNNING_PRE_PATCH_STEP; + case 14: + return RUNNING_POST_PATCH_STEP; + case 15: + return NO_AGENT_DETECTED; + 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 PatchState findValueByNumber(int number) { + return PatchState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.osconfig.v1.PatchJobs.Instance.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PatchState[] VALUES = values(); + + public static PatchState 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 PatchState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1.Instance.PatchState) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1.PatchJobs.Instance)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.Instance other = + (com.google.cloud.osconfig.v1.PatchJobs.Instance) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.Instance parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.Instance 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.osconfig.v1.PatchJobs.Instance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.Instance 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.osconfig.v1.PatchJobs.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.Instance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.Instance parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.Instance 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.osconfig.v1.PatchJobs.Instance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.Instance 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.osconfig.v1.PatchJobs.Instance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.Instance 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.osconfig.v1.PatchJobs.Instance 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; + } + /** + * + * + *
+     * Namespace for instance state enums.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.Instance} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.Instance) + com.google.cloud.osconfig.v1.PatchJobs.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_Instance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.Instance.class, + com.google.cloud.osconfig.v1.PatchJobs.Instance.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.Instance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_Instance_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.Instance getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.Instance build() { + com.google.cloud.osconfig.v1.PatchJobs.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.Instance buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.Instance result = + new com.google.cloud.osconfig.v1.PatchJobs.Instance(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1.PatchJobs.Instance) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.Instance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.Instance other) { + if (other == com.google.cloud.osconfig.v1.PatchJobs.Instance.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1.PatchJobs.Instance parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.Instance) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1.Instance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.Instance) + private static final com.google.cloud.osconfig.v1.PatchJobs.Instance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.Instance(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.Instance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Instance(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.osconfig.v1.PatchJobs.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CancelPatchJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.CancelPatchJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Message for canceling a patch job.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.CancelPatchJobRequest} + */ + public static final class CancelPatchJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.CancelPatchJobRequest) + CancelPatchJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelPatchJobRequest.newBuilder() to construct. + private CancelPatchJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelPatchJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelPatchJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CancelPatchJobRequest( + 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_CancelPatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_CancelPatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest.class, + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * + * 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) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * + * 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 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.osconfig.v1.PatchJobs.CancelPatchJobRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest other = + (com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest) 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.osconfig.v1.PatchJobs.CancelPatchJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest 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.osconfig.v1.PatchJobs.CancelPatchJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest 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.osconfig.v1.PatchJobs.CancelPatchJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest 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.osconfig.v1.PatchJobs.CancelPatchJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest 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.osconfig.v1.PatchJobs.CancelPatchJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest 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.osconfig.v1.PatchJobs.CancelPatchJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Message for canceling a patch job.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.CancelPatchJobRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.CancelPatchJobRequest) + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_CancelPatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_CancelPatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest.class, + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest.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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_CancelPatchJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest build() { + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest result = + new com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest(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.osconfig.v1.PatchJobs.CancelPatchJobRequest) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest other) { + if (other + == com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest.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.osconfig.v1.PatchJobs.CancelPatchJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. Name of the patch in the form `projects/*/patchJobs/*`
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Name of the patch in the form `projects/*/patchJobs/*`
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Name of the patch in the form `projects/*/patchJobs/*`
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Name of the patch in the form `projects/*/patchJobs/*`
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Name of the patch in the form `projects/*/patchJobs/*`
+       * 
+ * + * + * 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.osconfig.v1.CancelPatchJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.CancelPatchJobRequest) + private static final com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.CancelPatchJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelPatchJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CancelPatchJobRequest(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.osconfig.v1.PatchJobs.CancelPatchJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AptSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.AptSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * By changing the type to DIST, the patching is performed
+     * using `apt-get dist-upgrade` instead.
+     * 
+ * + * .google.cloud.osconfig.v1.AptSettings.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * By changing the type to DIST, the patching is performed
+     * using `apt-get dist-upgrade` instead.
+     * 
+ * + * .google.cloud.osconfig.v1.AptSettings.Type type = 1; + * + * @return The type. + */ + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type getType(); + + /** + * + * + *
+     * List of packages to exclude from update. These packages will be excluded
+     * 
+ * + * repeated string excludes = 2; + * + * @return A list containing the excludes. + */ + java.util.List getExcludesList(); + /** + * + * + *
+     * List of packages to exclude from update. These packages will be excluded
+     * 
+ * + * repeated string excludes = 2; + * + * @return The count of excludes. + */ + int getExcludesCount(); + /** + * + * + *
+     * List of packages to exclude from update. These packages will be excluded
+     * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + java.lang.String getExcludes(int index); + /** + * + * + *
+     * List of packages to exclude from update. These packages will be excluded
+     * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + com.google.protobuf.ByteString getExcludesBytes(int index); + + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field cannot be specified with any other patch configuration
+     * fields.
+     * 
+ * + * repeated string exclusive_packages = 3; + * + * @return A list containing the exclusivePackages. + */ + java.util.List getExclusivePackagesList(); + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field cannot be specified with any other patch configuration
+     * fields.
+     * 
+ * + * repeated string exclusive_packages = 3; + * + * @return The count of exclusivePackages. + */ + int getExclusivePackagesCount(); + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field cannot be specified with any other patch configuration
+     * fields.
+     * 
+ * + * repeated string exclusive_packages = 3; + * + * @param index The index of the element to return. + * @return The exclusivePackages at the given index. + */ + java.lang.String getExclusivePackages(int index); + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field cannot be specified with any other patch configuration
+     * fields.
+     * 
+ * + * repeated string exclusive_packages = 3; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePackages at the given index. + */ + com.google.protobuf.ByteString getExclusivePackagesBytes(int index); + } + /** + * + * + *
+   * Apt patching is completed by executing `apt-get update && apt-get
+   * upgrade`. Additional options can be set to control how this is executed.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.AptSettings} + */ + public static final class AptSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.AptSettings) + AptSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AptSettings.newBuilder() to construct. + private AptSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AptSettings() { + type_ = 0; + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + exclusivePackages_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AptSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AptSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + excludes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + excludes_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + exclusivePackages_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + exclusivePackages_.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)) { + excludes_ = excludes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + exclusivePackages_ = exclusivePackages_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_AptSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_AptSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.class, + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Builder.class); + } + + /** + * + * + *
+     * Apt patch type.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1.AptSettings.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * By default, upgrade will be performed.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Runs `apt-get dist-upgrade`.
+       * 
+ * + * DIST = 1; + */ + DIST(1), + /** + * + * + *
+       * Runs `apt-get upgrade`.
+       * 
+ * + * UPGRADE = 2; + */ + UPGRADE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * By default, upgrade will be performed.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Runs `apt-get dist-upgrade`.
+       * 
+ * + * DIST = 1; + */ + public static final int DIST_VALUE = 1; + /** + * + * + *
+       * Runs `apt-get upgrade`.
+       * 
+ * + * UPGRADE = 2; + */ + public static final int UPGRADE_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 DIST; + case 2: + return UPGRADE; + 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() { + 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.osconfig.v1.PatchJobs.AptSettings.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.osconfig.v1.AptSettings.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+     * By changing the type to DIST, the patching is performed
+     * using `apt-get dist-upgrade` instead.
+     * 
+ * + * .google.cloud.osconfig.v1.AptSettings.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * By changing the type to DIST, the patching is performed
+     * using `apt-get dist-upgrade` instead.
+     * 
+ * + * .google.cloud.osconfig.v1.AptSettings.Type type = 1; + * + * @return The type. + */ + public com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type result = + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type.UNRECOGNIZED + : result; + } + + public static final int EXCLUDES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList excludes_; + /** + * + * + *
+     * List of packages to exclude from update. These packages will be excluded
+     * 
+ * + * repeated string excludes = 2; + * + * @return A list containing the excludes. + */ + public com.google.protobuf.ProtocolStringList getExcludesList() { + return excludes_; + } + /** + * + * + *
+     * List of packages to exclude from update. These packages will be excluded
+     * 
+ * + * repeated string excludes = 2; + * + * @return The count of excludes. + */ + public int getExcludesCount() { + return excludes_.size(); + } + /** + * + * + *
+     * List of packages to exclude from update. These packages will be excluded
+     * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + public java.lang.String getExcludes(int index) { + return excludes_.get(index); + } + /** + * + * + *
+     * List of packages to exclude from update. These packages will be excluded
+     * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + public com.google.protobuf.ByteString getExcludesBytes(int index) { + return excludes_.getByteString(index); + } + + public static final int EXCLUSIVE_PACKAGES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList exclusivePackages_; + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field cannot be specified with any other patch configuration
+     * fields.
+     * 
+ * + * repeated string exclusive_packages = 3; + * + * @return A list containing the exclusivePackages. + */ + public com.google.protobuf.ProtocolStringList getExclusivePackagesList() { + return exclusivePackages_; + } + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field cannot be specified with any other patch configuration
+     * fields.
+     * 
+ * + * repeated string exclusive_packages = 3; + * + * @return The count of exclusivePackages. + */ + public int getExclusivePackagesCount() { + return exclusivePackages_.size(); + } + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field cannot be specified with any other patch configuration
+     * fields.
+     * 
+ * + * repeated string exclusive_packages = 3; + * + * @param index The index of the element to return. + * @return The exclusivePackages at the given index. + */ + public java.lang.String getExclusivePackages(int index) { + return exclusivePackages_.get(index); + } + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field cannot be specified with any other patch configuration
+     * fields.
+     * 
+ * + * repeated string exclusive_packages = 3; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePackages at the given index. + */ + public com.google.protobuf.ByteString getExclusivePackagesBytes(int index) { + return exclusivePackages_.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 { + if (type_ + != com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + for (int i = 0; i < excludes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, excludes_.getRaw(i)); + } + for (int i = 0; i < exclusivePackages_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, exclusivePackages_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + { + int dataSize = 0; + for (int i = 0; i < excludes_.size(); i++) { + dataSize += computeStringSizeNoTag(excludes_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < exclusivePackages_.size(); i++) { + dataSize += computeStringSizeNoTag(exclusivePackages_.getRaw(i)); + } + size += dataSize; + size += 1 * getExclusivePackagesList().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.osconfig.v1.PatchJobs.AptSettings)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.AptSettings other = + (com.google.cloud.osconfig.v1.PatchJobs.AptSettings) obj; + + if (type_ != other.type_) return false; + if (!getExcludesList().equals(other.getExcludesList())) return false; + if (!getExclusivePackagesList().equals(other.getExclusivePackagesList())) 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_; + if (getExcludesCount() > 0) { + hash = (37 * hash) + EXCLUDES_FIELD_NUMBER; + hash = (53 * hash) + getExcludesList().hashCode(); + } + if (getExclusivePackagesCount() > 0) { + hash = (37 * hash) + EXCLUSIVE_PACKAGES_FIELD_NUMBER; + hash = (53 * hash) + getExclusivePackagesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.AptSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.AptSettings 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.osconfig.v1.PatchJobs.AptSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.AptSettings 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.osconfig.v1.PatchJobs.AptSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.AptSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.AptSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.AptSettings 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.osconfig.v1.PatchJobs.AptSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.AptSettings 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.osconfig.v1.PatchJobs.AptSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.AptSettings 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.osconfig.v1.PatchJobs.AptSettings 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; + } + /** + * + * + *
+     * Apt patching is completed by executing `apt-get update && apt-get
+     * upgrade`. Additional options can be set to control how this is executed.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.AptSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.AptSettings) + com.google.cloud.osconfig.v1.PatchJobs.AptSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_AptSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_AptSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.class, + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.AptSettings.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; + + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + exclusivePackages_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_AptSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.AptSettings getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.AptSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.AptSettings build() { + com.google.cloud.osconfig.v1.PatchJobs.AptSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.AptSettings buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.AptSettings result = + new com.google.cloud.osconfig.v1.PatchJobs.AptSettings(this); + int from_bitField0_ = bitField0_; + result.type_ = type_; + if (((bitField0_ & 0x00000001) != 0)) { + excludes_ = excludes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.excludes_ = excludes_; + if (((bitField0_ & 0x00000002) != 0)) { + exclusivePackages_ = exclusivePackages_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.exclusivePackages_ = exclusivePackages_; + 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.osconfig.v1.PatchJobs.AptSettings) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.AptSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.AptSettings other) { + if (other == com.google.cloud.osconfig.v1.PatchJobs.AptSettings.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.excludes_.isEmpty()) { + if (excludes_.isEmpty()) { + excludes_ = other.excludes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExcludesIsMutable(); + excludes_.addAll(other.excludes_); + } + onChanged(); + } + if (!other.exclusivePackages_.isEmpty()) { + if (exclusivePackages_.isEmpty()) { + exclusivePackages_ = other.exclusivePackages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureExclusivePackagesIsMutable(); + exclusivePackages_.addAll(other.exclusivePackages_); + } + 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.osconfig.v1.PatchJobs.AptSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.AptSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int type_ = 0; + /** + * + * + *
+       * By changing the type to DIST, the patching is performed
+       * using `apt-get dist-upgrade` instead.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * By changing the type to DIST, the patching is performed
+       * using `apt-get dist-upgrade` instead.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings.Type type = 1; + * + * @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; + } + /** + * + * + *
+       * By changing the type to DIST, the patching is performed
+       * using `apt-get dist-upgrade` instead.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings.Type type = 1; + * + * @return The type. + */ + public com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type result = + com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * By changing the type to DIST, the patching is performed
+       * using `apt-get dist-upgrade` instead.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings.Type type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.osconfig.v1.PatchJobs.AptSettings.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * By changing the type to DIST, the patching is performed
+       * using `apt-get dist-upgrade` instead.
+       * 
+ * + * .google.cloud.osconfig.v1.AptSettings.Type type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList excludes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureExcludesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + excludes_ = new com.google.protobuf.LazyStringArrayList(excludes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * List of packages to exclude from update. These packages will be excluded
+       * 
+ * + * repeated string excludes = 2; + * + * @return A list containing the excludes. + */ + public com.google.protobuf.ProtocolStringList getExcludesList() { + return excludes_.getUnmodifiableView(); + } + /** + * + * + *
+       * List of packages to exclude from update. These packages will be excluded
+       * 
+ * + * repeated string excludes = 2; + * + * @return The count of excludes. + */ + public int getExcludesCount() { + return excludes_.size(); + } + /** + * + * + *
+       * List of packages to exclude from update. These packages will be excluded
+       * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + public java.lang.String getExcludes(int index) { + return excludes_.get(index); + } + /** + * + * + *
+       * List of packages to exclude from update. These packages will be excluded
+       * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + public com.google.protobuf.ByteString getExcludesBytes(int index) { + return excludes_.getByteString(index); + } + /** + * + * + *
+       * List of packages to exclude from update. These packages will be excluded
+       * 
+ * + * repeated string excludes = 2; + * + * @param index The index to set the value at. + * @param value The excludes to set. + * @return This builder for chaining. + */ + public Builder setExcludes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludesIsMutable(); + excludes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of packages to exclude from update. These packages will be excluded
+       * 
+ * + * repeated string excludes = 2; + * + * @param value The excludes to add. + * @return This builder for chaining. + */ + public Builder addExcludes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludesIsMutable(); + excludes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of packages to exclude from update. These packages will be excluded
+       * 
+ * + * repeated string excludes = 2; + * + * @param values The excludes to add. + * @return This builder for chaining. + */ + public Builder addAllExcludes(java.lang.Iterable values) { + ensureExcludesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludes_); + onChanged(); + return this; + } + /** + * + * + *
+       * List of packages to exclude from update. These packages will be excluded
+       * 
+ * + * repeated string excludes = 2; + * + * @return This builder for chaining. + */ + public Builder clearExcludes() { + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * List of packages to exclude from update. These packages will be excluded
+       * 
+ * + * repeated string excludes = 2; + * + * @param value The bytes of the excludes to add. + * @return This builder for chaining. + */ + public Builder addExcludesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludesIsMutable(); + excludes_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList exclusivePackages_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureExclusivePackagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + exclusivePackages_ = new com.google.protobuf.LazyStringArrayList(exclusivePackages_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field cannot be specified with any other patch configuration
+       * fields.
+       * 
+ * + * repeated string exclusive_packages = 3; + * + * @return A list containing the exclusivePackages. + */ + public com.google.protobuf.ProtocolStringList getExclusivePackagesList() { + return exclusivePackages_.getUnmodifiableView(); + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field cannot be specified with any other patch configuration
+       * fields.
+       * 
+ * + * repeated string exclusive_packages = 3; + * + * @return The count of exclusivePackages. + */ + public int getExclusivePackagesCount() { + return exclusivePackages_.size(); + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field cannot be specified with any other patch configuration
+       * fields.
+       * 
+ * + * repeated string exclusive_packages = 3; + * + * @param index The index of the element to return. + * @return The exclusivePackages at the given index. + */ + public java.lang.String getExclusivePackages(int index) { + return exclusivePackages_.get(index); + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field cannot be specified with any other patch configuration
+       * fields.
+       * 
+ * + * repeated string exclusive_packages = 3; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePackages at the given index. + */ + public com.google.protobuf.ByteString getExclusivePackagesBytes(int index) { + return exclusivePackages_.getByteString(index); + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field cannot be specified with any other patch configuration
+       * fields.
+       * 
+ * + * repeated string exclusive_packages = 3; + * + * @param index The index to set the value at. + * @param value The exclusivePackages to set. + * @return This builder for chaining. + */ + public Builder setExclusivePackages(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusivePackagesIsMutable(); + exclusivePackages_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field cannot be specified with any other patch configuration
+       * fields.
+       * 
+ * + * repeated string exclusive_packages = 3; + * + * @param value The exclusivePackages to add. + * @return This builder for chaining. + */ + public Builder addExclusivePackages(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusivePackagesIsMutable(); + exclusivePackages_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field cannot be specified with any other patch configuration
+       * fields.
+       * 
+ * + * repeated string exclusive_packages = 3; + * + * @param values The exclusivePackages to add. + * @return This builder for chaining. + */ + public Builder addAllExclusivePackages(java.lang.Iterable values) { + ensureExclusivePackagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exclusivePackages_); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field cannot be specified with any other patch configuration
+       * fields.
+       * 
+ * + * repeated string exclusive_packages = 3; + * + * @return This builder for chaining. + */ + public Builder clearExclusivePackages() { + exclusivePackages_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field cannot be specified with any other patch configuration
+       * fields.
+       * 
+ * + * repeated string exclusive_packages = 3; + * + * @param value The bytes of the exclusivePackages to add. + * @return This builder for chaining. + */ + public Builder addExclusivePackagesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExclusivePackagesIsMutable(); + exclusivePackages_.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.osconfig.v1.AptSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.AptSettings) + private static final com.google.cloud.osconfig.v1.PatchJobs.AptSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.AptSettings(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.AptSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AptSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AptSettings(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.osconfig.v1.PatchJobs.AptSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface YumSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.YumSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Adds the `--security` flag to `yum update`. Not supported on
+     * all platforms.
+     * 
+ * + * bool security = 1; + * + * @return The security. + */ + boolean getSecurity(); + + /** + * + * + *
+     * Will cause patch to run `yum update-minimal` instead.
+     * 
+ * + * bool minimal = 2; + * + * @return The minimal. + */ + boolean getMinimal(); + + /** + * + * + *
+     * List of packages to exclude from update. These packages are excluded by
+     * using the yum `--exclude` flag.
+     * 
+ * + * repeated string excludes = 3; + * + * @return A list containing the excludes. + */ + java.util.List getExcludesList(); + /** + * + * + *
+     * List of packages to exclude from update. These packages are excluded by
+     * using the yum `--exclude` flag.
+     * 
+ * + * repeated string excludes = 3; + * + * @return The count of excludes. + */ + int getExcludesCount(); + /** + * + * + *
+     * List of packages to exclude from update. These packages are excluded by
+     * using the yum `--exclude` flag.
+     * 
+ * + * repeated string excludes = 3; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + java.lang.String getExcludes(int index); + /** + * + * + *
+     * List of packages to exclude from update. These packages are excluded by
+     * using the yum `--exclude` flag.
+     * 
+ * + * repeated string excludes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + com.google.protobuf.ByteString getExcludesBytes(int index); + + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field must not be specified with any other patch
+     * configuration fields.
+     * 
+ * + * repeated string exclusive_packages = 4; + * + * @return A list containing the exclusivePackages. + */ + java.util.List getExclusivePackagesList(); + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field must not be specified with any other patch
+     * configuration fields.
+     * 
+ * + * repeated string exclusive_packages = 4; + * + * @return The count of exclusivePackages. + */ + int getExclusivePackagesCount(); + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field must not be specified with any other patch
+     * configuration fields.
+     * 
+ * + * repeated string exclusive_packages = 4; + * + * @param index The index of the element to return. + * @return The exclusivePackages at the given index. + */ + java.lang.String getExclusivePackages(int index); + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field must not be specified with any other patch
+     * configuration fields.
+     * 
+ * + * repeated string exclusive_packages = 4; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePackages at the given index. + */ + com.google.protobuf.ByteString getExclusivePackagesBytes(int index); + } + /** + * + * + *
+   * Yum patching is performed by executing `yum update`. Additional options
+   * can be set to control how this is executed.
+   * Note that not all settings are supported on all platforms.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.YumSettings} + */ + public static final class YumSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.YumSettings) + YumSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use YumSettings.newBuilder() to construct. + private YumSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private YumSettings() { + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + exclusivePackages_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new YumSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private YumSettings( + 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: + { + security_ = input.readBool(); + break; + } + case 16: + { + minimal_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + excludes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + excludes_.add(s); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + exclusivePackages_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + exclusivePackages_.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)) { + excludes_ = excludes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + exclusivePackages_ = exclusivePackages_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_YumSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_YumSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.YumSettings.class, + com.google.cloud.osconfig.v1.PatchJobs.YumSettings.Builder.class); + } + + public static final int SECURITY_FIELD_NUMBER = 1; + private boolean security_; + /** + * + * + *
+     * Adds the `--security` flag to `yum update`. Not supported on
+     * all platforms.
+     * 
+ * + * bool security = 1; + * + * @return The security. + */ + public boolean getSecurity() { + return security_; + } + + public static final int MINIMAL_FIELD_NUMBER = 2; + private boolean minimal_; + /** + * + * + *
+     * Will cause patch to run `yum update-minimal` instead.
+     * 
+ * + * bool minimal = 2; + * + * @return The minimal. + */ + public boolean getMinimal() { + return minimal_; + } + + public static final int EXCLUDES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList excludes_; + /** + * + * + *
+     * List of packages to exclude from update. These packages are excluded by
+     * using the yum `--exclude` flag.
+     * 
+ * + * repeated string excludes = 3; + * + * @return A list containing the excludes. + */ + public com.google.protobuf.ProtocolStringList getExcludesList() { + return excludes_; + } + /** + * + * + *
+     * List of packages to exclude from update. These packages are excluded by
+     * using the yum `--exclude` flag.
+     * 
+ * + * repeated string excludes = 3; + * + * @return The count of excludes. + */ + public int getExcludesCount() { + return excludes_.size(); + } + /** + * + * + *
+     * List of packages to exclude from update. These packages are excluded by
+     * using the yum `--exclude` flag.
+     * 
+ * + * repeated string excludes = 3; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + public java.lang.String getExcludes(int index) { + return excludes_.get(index); + } + /** + * + * + *
+     * List of packages to exclude from update. These packages are excluded by
+     * using the yum `--exclude` flag.
+     * 
+ * + * repeated string excludes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + public com.google.protobuf.ByteString getExcludesBytes(int index) { + return excludes_.getByteString(index); + } + + public static final int EXCLUSIVE_PACKAGES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList exclusivePackages_; + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field must not be specified with any other patch
+     * configuration fields.
+     * 
+ * + * repeated string exclusive_packages = 4; + * + * @return A list containing the exclusivePackages. + */ + public com.google.protobuf.ProtocolStringList getExclusivePackagesList() { + return exclusivePackages_; + } + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field must not be specified with any other patch
+     * configuration fields.
+     * 
+ * + * repeated string exclusive_packages = 4; + * + * @return The count of exclusivePackages. + */ + public int getExclusivePackagesCount() { + return exclusivePackages_.size(); + } + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field must not be specified with any other patch
+     * configuration fields.
+     * 
+ * + * repeated string exclusive_packages = 4; + * + * @param index The index of the element to return. + * @return The exclusivePackages at the given index. + */ + public java.lang.String getExclusivePackages(int index) { + return exclusivePackages_.get(index); + } + /** + * + * + *
+     * An exclusive list of packages to be updated. These are the only packages
+     * that will be updated. If these packages are not installed, they will be
+     * ignored. This field must not be specified with any other patch
+     * configuration fields.
+     * 
+ * + * repeated string exclusive_packages = 4; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePackages at the given index. + */ + public com.google.protobuf.ByteString getExclusivePackagesBytes(int index) { + return exclusivePackages_.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 { + if (security_ != false) { + output.writeBool(1, security_); + } + if (minimal_ != false) { + output.writeBool(2, minimal_); + } + for (int i = 0; i < excludes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, excludes_.getRaw(i)); + } + for (int i = 0; i < exclusivePackages_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, exclusivePackages_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (security_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, security_); + } + if (minimal_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, minimal_); + } + { + int dataSize = 0; + for (int i = 0; i < excludes_.size(); i++) { + dataSize += computeStringSizeNoTag(excludes_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < exclusivePackages_.size(); i++) { + dataSize += computeStringSizeNoTag(exclusivePackages_.getRaw(i)); + } + size += dataSize; + size += 1 * getExclusivePackagesList().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.osconfig.v1.PatchJobs.YumSettings)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.YumSettings other = + (com.google.cloud.osconfig.v1.PatchJobs.YumSettings) obj; + + if (getSecurity() != other.getSecurity()) return false; + if (getMinimal() != other.getMinimal()) return false; + if (!getExcludesList().equals(other.getExcludesList())) return false; + if (!getExclusivePackagesList().equals(other.getExclusivePackagesList())) 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) + SECURITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSecurity()); + hash = (37 * hash) + MINIMAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMinimal()); + if (getExcludesCount() > 0) { + hash = (37 * hash) + EXCLUDES_FIELD_NUMBER; + hash = (53 * hash) + getExcludesList().hashCode(); + } + if (getExclusivePackagesCount() > 0) { + hash = (37 * hash) + EXCLUSIVE_PACKAGES_FIELD_NUMBER; + hash = (53 * hash) + getExclusivePackagesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.YumSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.YumSettings 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.osconfig.v1.PatchJobs.YumSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.YumSettings 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.osconfig.v1.PatchJobs.YumSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.YumSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.YumSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.YumSettings 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.osconfig.v1.PatchJobs.YumSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.YumSettings 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.osconfig.v1.PatchJobs.YumSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.YumSettings 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.osconfig.v1.PatchJobs.YumSettings 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; + } + /** + * + * + *
+     * Yum patching is performed by executing `yum update`. Additional options
+     * can be set to control how this is executed.
+     * Note that not all settings are supported on all platforms.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.YumSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.YumSettings) + com.google.cloud.osconfig.v1.PatchJobs.YumSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_YumSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_YumSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.YumSettings.class, + com.google.cloud.osconfig.v1.PatchJobs.YumSettings.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.YumSettings.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(); + security_ = false; + + minimal_ = false; + + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + exclusivePackages_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_YumSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.YumSettings getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.YumSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.YumSettings build() { + com.google.cloud.osconfig.v1.PatchJobs.YumSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.YumSettings buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.YumSettings result = + new com.google.cloud.osconfig.v1.PatchJobs.YumSettings(this); + int from_bitField0_ = bitField0_; + result.security_ = security_; + result.minimal_ = minimal_; + if (((bitField0_ & 0x00000001) != 0)) { + excludes_ = excludes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.excludes_ = excludes_; + if (((bitField0_ & 0x00000002) != 0)) { + exclusivePackages_ = exclusivePackages_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.exclusivePackages_ = exclusivePackages_; + 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.osconfig.v1.PatchJobs.YumSettings) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.YumSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.YumSettings other) { + if (other == com.google.cloud.osconfig.v1.PatchJobs.YumSettings.getDefaultInstance()) + return this; + if (other.getSecurity() != false) { + setSecurity(other.getSecurity()); + } + if (other.getMinimal() != false) { + setMinimal(other.getMinimal()); + } + if (!other.excludes_.isEmpty()) { + if (excludes_.isEmpty()) { + excludes_ = other.excludes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExcludesIsMutable(); + excludes_.addAll(other.excludes_); + } + onChanged(); + } + if (!other.exclusivePackages_.isEmpty()) { + if (exclusivePackages_.isEmpty()) { + exclusivePackages_ = other.exclusivePackages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureExclusivePackagesIsMutable(); + exclusivePackages_.addAll(other.exclusivePackages_); + } + 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.osconfig.v1.PatchJobs.YumSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.YumSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private boolean security_; + /** + * + * + *
+       * Adds the `--security` flag to `yum update`. Not supported on
+       * all platforms.
+       * 
+ * + * bool security = 1; + * + * @return The security. + */ + public boolean getSecurity() { + return security_; + } + /** + * + * + *
+       * Adds the `--security` flag to `yum update`. Not supported on
+       * all platforms.
+       * 
+ * + * bool security = 1; + * + * @param value The security to set. + * @return This builder for chaining. + */ + public Builder setSecurity(boolean value) { + + security_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Adds the `--security` flag to `yum update`. Not supported on
+       * all platforms.
+       * 
+ * + * bool security = 1; + * + * @return This builder for chaining. + */ + public Builder clearSecurity() { + + security_ = false; + onChanged(); + return this; + } + + private boolean minimal_; + /** + * + * + *
+       * Will cause patch to run `yum update-minimal` instead.
+       * 
+ * + * bool minimal = 2; + * + * @return The minimal. + */ + public boolean getMinimal() { + return minimal_; + } + /** + * + * + *
+       * Will cause patch to run `yum update-minimal` instead.
+       * 
+ * + * bool minimal = 2; + * + * @param value The minimal to set. + * @return This builder for chaining. + */ + public Builder setMinimal(boolean value) { + + minimal_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Will cause patch to run `yum update-minimal` instead.
+       * 
+ * + * bool minimal = 2; + * + * @return This builder for chaining. + */ + public Builder clearMinimal() { + + minimal_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList excludes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureExcludesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + excludes_ = new com.google.protobuf.LazyStringArrayList(excludes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * List of packages to exclude from update. These packages are excluded by
+       * using the yum `--exclude` flag.
+       * 
+ * + * repeated string excludes = 3; + * + * @return A list containing the excludes. + */ + public com.google.protobuf.ProtocolStringList getExcludesList() { + return excludes_.getUnmodifiableView(); + } + /** + * + * + *
+       * List of packages to exclude from update. These packages are excluded by
+       * using the yum `--exclude` flag.
+       * 
+ * + * repeated string excludes = 3; + * + * @return The count of excludes. + */ + public int getExcludesCount() { + return excludes_.size(); + } + /** + * + * + *
+       * List of packages to exclude from update. These packages are excluded by
+       * using the yum `--exclude` flag.
+       * 
+ * + * repeated string excludes = 3; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + public java.lang.String getExcludes(int index) { + return excludes_.get(index); + } + /** + * + * + *
+       * List of packages to exclude from update. These packages are excluded by
+       * using the yum `--exclude` flag.
+       * 
+ * + * repeated string excludes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + public com.google.protobuf.ByteString getExcludesBytes(int index) { + return excludes_.getByteString(index); + } + /** + * + * + *
+       * List of packages to exclude from update. These packages are excluded by
+       * using the yum `--exclude` flag.
+       * 
+ * + * repeated string excludes = 3; + * + * @param index The index to set the value at. + * @param value The excludes to set. + * @return This builder for chaining. + */ + public Builder setExcludes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludesIsMutable(); + excludes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of packages to exclude from update. These packages are excluded by
+       * using the yum `--exclude` flag.
+       * 
+ * + * repeated string excludes = 3; + * + * @param value The excludes to add. + * @return This builder for chaining. + */ + public Builder addExcludes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludesIsMutable(); + excludes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of packages to exclude from update. These packages are excluded by
+       * using the yum `--exclude` flag.
+       * 
+ * + * repeated string excludes = 3; + * + * @param values The excludes to add. + * @return This builder for chaining. + */ + public Builder addAllExcludes(java.lang.Iterable values) { + ensureExcludesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludes_); + onChanged(); + return this; + } + /** + * + * + *
+       * List of packages to exclude from update. These packages are excluded by
+       * using the yum `--exclude` flag.
+       * 
+ * + * repeated string excludes = 3; + * + * @return This builder for chaining. + */ + public Builder clearExcludes() { + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * List of packages to exclude from update. These packages are excluded by
+       * using the yum `--exclude` flag.
+       * 
+ * + * repeated string excludes = 3; + * + * @param value The bytes of the excludes to add. + * @return This builder for chaining. + */ + public Builder addExcludesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludesIsMutable(); + excludes_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList exclusivePackages_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureExclusivePackagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + exclusivePackages_ = new com.google.protobuf.LazyStringArrayList(exclusivePackages_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field must not be specified with any other patch
+       * configuration fields.
+       * 
+ * + * repeated string exclusive_packages = 4; + * + * @return A list containing the exclusivePackages. + */ + public com.google.protobuf.ProtocolStringList getExclusivePackagesList() { + return exclusivePackages_.getUnmodifiableView(); + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field must not be specified with any other patch
+       * configuration fields.
+       * 
+ * + * repeated string exclusive_packages = 4; + * + * @return The count of exclusivePackages. + */ + public int getExclusivePackagesCount() { + return exclusivePackages_.size(); + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field must not be specified with any other patch
+       * configuration fields.
+       * 
+ * + * repeated string exclusive_packages = 4; + * + * @param index The index of the element to return. + * @return The exclusivePackages at the given index. + */ + public java.lang.String getExclusivePackages(int index) { + return exclusivePackages_.get(index); + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field must not be specified with any other patch
+       * configuration fields.
+       * 
+ * + * repeated string exclusive_packages = 4; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePackages at the given index. + */ + public com.google.protobuf.ByteString getExclusivePackagesBytes(int index) { + return exclusivePackages_.getByteString(index); + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field must not be specified with any other patch
+       * configuration fields.
+       * 
+ * + * repeated string exclusive_packages = 4; + * + * @param index The index to set the value at. + * @param value The exclusivePackages to set. + * @return This builder for chaining. + */ + public Builder setExclusivePackages(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusivePackagesIsMutable(); + exclusivePackages_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field must not be specified with any other patch
+       * configuration fields.
+       * 
+ * + * repeated string exclusive_packages = 4; + * + * @param value The exclusivePackages to add. + * @return This builder for chaining. + */ + public Builder addExclusivePackages(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusivePackagesIsMutable(); + exclusivePackages_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field must not be specified with any other patch
+       * configuration fields.
+       * 
+ * + * repeated string exclusive_packages = 4; + * + * @param values The exclusivePackages to add. + * @return This builder for chaining. + */ + public Builder addAllExclusivePackages(java.lang.Iterable values) { + ensureExclusivePackagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exclusivePackages_); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field must not be specified with any other patch
+       * configuration fields.
+       * 
+ * + * repeated string exclusive_packages = 4; + * + * @return This builder for chaining. + */ + public Builder clearExclusivePackages() { + exclusivePackages_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of packages to be updated. These are the only packages
+       * that will be updated. If these packages are not installed, they will be
+       * ignored. This field must not be specified with any other patch
+       * configuration fields.
+       * 
+ * + * repeated string exclusive_packages = 4; + * + * @param value The bytes of the exclusivePackages to add. + * @return This builder for chaining. + */ + public Builder addExclusivePackagesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExclusivePackagesIsMutable(); + exclusivePackages_.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.osconfig.v1.YumSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.YumSettings) + private static final com.google.cloud.osconfig.v1.PatchJobs.YumSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.YumSettings(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.YumSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public YumSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new YumSettings(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.osconfig.v1.PatchJobs.YumSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GooSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.GooSettings) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Googet patching is performed by running `googet update`.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.GooSettings} + */ + public static final class GooSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.GooSettings) + GooSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GooSettings.newBuilder() to construct. + private GooSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GooSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GooSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GooSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GooSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GooSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.GooSettings.class, + com.google.cloud.osconfig.v1.PatchJobs.GooSettings.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1.PatchJobs.GooSettings)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.GooSettings other = + (com.google.cloud.osconfig.v1.PatchJobs.GooSettings) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GooSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GooSettings 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.osconfig.v1.PatchJobs.GooSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GooSettings 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.osconfig.v1.PatchJobs.GooSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GooSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GooSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GooSettings 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.osconfig.v1.PatchJobs.GooSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GooSettings 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.osconfig.v1.PatchJobs.GooSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GooSettings 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.osconfig.v1.PatchJobs.GooSettings 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; + } + /** + * + * + *
+     * Googet patching is performed by running `googet update`.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.GooSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.GooSettings) + com.google.cloud.osconfig.v1.PatchJobs.GooSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GooSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GooSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.GooSettings.class, + com.google.cloud.osconfig.v1.PatchJobs.GooSettings.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.GooSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GooSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.GooSettings getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.GooSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.GooSettings build() { + com.google.cloud.osconfig.v1.PatchJobs.GooSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.GooSettings buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.GooSettings result = + new com.google.cloud.osconfig.v1.PatchJobs.GooSettings(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1.PatchJobs.GooSettings) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.GooSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.GooSettings other) { + if (other == com.google.cloud.osconfig.v1.PatchJobs.GooSettings.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1.PatchJobs.GooSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.GooSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1.GooSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.GooSettings) + private static final com.google.cloud.osconfig.v1.PatchJobs.GooSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.GooSettings(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GooSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GooSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GooSettings(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.osconfig.v1.PatchJobs.GooSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ZypperSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.ZypperSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Adds the `--with-optional` flag to `zypper patch`.
+     * 
+ * + * bool with_optional = 1; + * + * @return The withOptional. + */ + boolean getWithOptional(); + + /** + * + * + *
+     * Adds the `--with-update` flag, to `zypper patch`.
+     * 
+ * + * bool with_update = 2; + * + * @return The withUpdate. + */ + boolean getWithUpdate(); + + /** + * + * + *
+     * Install only patches with these categories.
+     * Common categories include security, recommended, and feature.
+     * 
+ * + * repeated string categories = 3; + * + * @return A list containing the categories. + */ + java.util.List getCategoriesList(); + /** + * + * + *
+     * Install only patches with these categories.
+     * Common categories include security, recommended, and feature.
+     * 
+ * + * repeated string categories = 3; + * + * @return The count of categories. + */ + int getCategoriesCount(); + /** + * + * + *
+     * Install only patches with these categories.
+     * Common categories include security, recommended, and feature.
+     * 
+ * + * repeated string categories = 3; + * + * @param index The index of the element to return. + * @return The categories at the given index. + */ + java.lang.String getCategories(int index); + /** + * + * + *
+     * Install only patches with these categories.
+     * Common categories include security, recommended, and feature.
+     * 
+ * + * repeated string categories = 3; + * + * @param index The index of the value to return. + * @return The bytes of the categories at the given index. + */ + com.google.protobuf.ByteString getCategoriesBytes(int index); + + /** + * + * + *
+     * Install only patches with these severities.
+     * Common severities include critical, important, moderate, and low.
+     * 
+ * + * repeated string severities = 4; + * + * @return A list containing the severities. + */ + java.util.List getSeveritiesList(); + /** + * + * + *
+     * Install only patches with these severities.
+     * Common severities include critical, important, moderate, and low.
+     * 
+ * + * repeated string severities = 4; + * + * @return The count of severities. + */ + int getSeveritiesCount(); + /** + * + * + *
+     * Install only patches with these severities.
+     * Common severities include critical, important, moderate, and low.
+     * 
+ * + * repeated string severities = 4; + * + * @param index The index of the element to return. + * @return The severities at the given index. + */ + java.lang.String getSeverities(int index); + /** + * + * + *
+     * Install only patches with these severities.
+     * Common severities include critical, important, moderate, and low.
+     * 
+ * + * repeated string severities = 4; + * + * @param index The index of the value to return. + * @return The bytes of the severities at the given index. + */ + com.google.protobuf.ByteString getSeveritiesBytes(int index); + + /** + * + * + *
+     * List of patches to exclude from update.
+     * 
+ * + * repeated string excludes = 5; + * + * @return A list containing the excludes. + */ + java.util.List getExcludesList(); + /** + * + * + *
+     * List of patches to exclude from update.
+     * 
+ * + * repeated string excludes = 5; + * + * @return The count of excludes. + */ + int getExcludesCount(); + /** + * + * + *
+     * List of patches to exclude from update.
+     * 
+ * + * repeated string excludes = 5; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + java.lang.String getExcludes(int index); + /** + * + * + *
+     * List of patches to exclude from update.
+     * 
+ * + * repeated string excludes = 5; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + com.google.protobuf.ByteString getExcludesBytes(int index); + + /** + * + * + *
+     * An exclusive list of patches to be updated. These are the only patches
+     * that will be installed using 'zypper patch patch:<patch_name>' command.
+     * This field must not be used with any other patch configuration fields.
+     * 
+ * + * repeated string exclusive_patches = 6; + * + * @return A list containing the exclusivePatches. + */ + java.util.List getExclusivePatchesList(); + /** + * + * + *
+     * An exclusive list of patches to be updated. These are the only patches
+     * that will be installed using 'zypper patch patch:<patch_name>' command.
+     * This field must not be used with any other patch configuration fields.
+     * 
+ * + * repeated string exclusive_patches = 6; + * + * @return The count of exclusivePatches. + */ + int getExclusivePatchesCount(); + /** + * + * + *
+     * An exclusive list of patches to be updated. These are the only patches
+     * that will be installed using 'zypper patch patch:<patch_name>' command.
+     * This field must not be used with any other patch configuration fields.
+     * 
+ * + * repeated string exclusive_patches = 6; + * + * @param index The index of the element to return. + * @return The exclusivePatches at the given index. + */ + java.lang.String getExclusivePatches(int index); + /** + * + * + *
+     * An exclusive list of patches to be updated. These are the only patches
+     * that will be installed using 'zypper patch patch:<patch_name>' command.
+     * This field must not be used with any other patch configuration fields.
+     * 
+ * + * repeated string exclusive_patches = 6; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePatches at the given index. + */ + com.google.protobuf.ByteString getExclusivePatchesBytes(int index); + } + /** + * + * + *
+   * Zypper patching is performed by running `zypper patch`.
+   * See also https://en.opensuse.org/SDB:Zypper_manual.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ZypperSettings} + */ + public static final class ZypperSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.ZypperSettings) + ZypperSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ZypperSettings.newBuilder() to construct. + private ZypperSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ZypperSettings() { + categories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + severities_ = com.google.protobuf.LazyStringArrayList.EMPTY; + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + exclusivePatches_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ZypperSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ZypperSettings( + 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: + { + withOptional_ = input.readBool(); + break; + } + case 16: + { + withUpdate_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + categories_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + categories_.add(s); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + severities_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + severities_.add(s); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + excludes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + excludes_.add(s); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + exclusivePatches_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + exclusivePatches_.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)) { + categories_ = categories_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + severities_ = severities_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + excludes_ = excludes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + exclusivePatches_ = exclusivePatches_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ZypperSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ZypperSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.class, + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.Builder.class); + } + + public static final int WITH_OPTIONAL_FIELD_NUMBER = 1; + private boolean withOptional_; + /** + * + * + *
+     * Adds the `--with-optional` flag to `zypper patch`.
+     * 
+ * + * bool with_optional = 1; + * + * @return The withOptional. + */ + public boolean getWithOptional() { + return withOptional_; + } + + public static final int WITH_UPDATE_FIELD_NUMBER = 2; + private boolean withUpdate_; + /** + * + * + *
+     * Adds the `--with-update` flag, to `zypper patch`.
+     * 
+ * + * bool with_update = 2; + * + * @return The withUpdate. + */ + public boolean getWithUpdate() { + return withUpdate_; + } + + public static final int CATEGORIES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList categories_; + /** + * + * + *
+     * Install only patches with these categories.
+     * Common categories include security, recommended, and feature.
+     * 
+ * + * repeated string categories = 3; + * + * @return A list containing the categories. + */ + public com.google.protobuf.ProtocolStringList getCategoriesList() { + return categories_; + } + /** + * + * + *
+     * Install only patches with these categories.
+     * Common categories include security, recommended, and feature.
+     * 
+ * + * repeated string categories = 3; + * + * @return The count of categories. + */ + public int getCategoriesCount() { + return categories_.size(); + } + /** + * + * + *
+     * Install only patches with these categories.
+     * Common categories include security, recommended, and feature.
+     * 
+ * + * repeated string categories = 3; + * + * @param index The index of the element to return. + * @return The categories at the given index. + */ + public java.lang.String getCategories(int index) { + return categories_.get(index); + } + /** + * + * + *
+     * Install only patches with these categories.
+     * Common categories include security, recommended, and feature.
+     * 
+ * + * repeated string categories = 3; + * + * @param index The index of the value to return. + * @return The bytes of the categories at the given index. + */ + public com.google.protobuf.ByteString getCategoriesBytes(int index) { + return categories_.getByteString(index); + } + + public static final int SEVERITIES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList severities_; + /** + * + * + *
+     * Install only patches with these severities.
+     * Common severities include critical, important, moderate, and low.
+     * 
+ * + * repeated string severities = 4; + * + * @return A list containing the severities. + */ + public com.google.protobuf.ProtocolStringList getSeveritiesList() { + return severities_; + } + /** + * + * + *
+     * Install only patches with these severities.
+     * Common severities include critical, important, moderate, and low.
+     * 
+ * + * repeated string severities = 4; + * + * @return The count of severities. + */ + public int getSeveritiesCount() { + return severities_.size(); + } + /** + * + * + *
+     * Install only patches with these severities.
+     * Common severities include critical, important, moderate, and low.
+     * 
+ * + * repeated string severities = 4; + * + * @param index The index of the element to return. + * @return The severities at the given index. + */ + public java.lang.String getSeverities(int index) { + return severities_.get(index); + } + /** + * + * + *
+     * Install only patches with these severities.
+     * Common severities include critical, important, moderate, and low.
+     * 
+ * + * repeated string severities = 4; + * + * @param index The index of the value to return. + * @return The bytes of the severities at the given index. + */ + public com.google.protobuf.ByteString getSeveritiesBytes(int index) { + return severities_.getByteString(index); + } + + public static final int EXCLUDES_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList excludes_; + /** + * + * + *
+     * List of patches to exclude from update.
+     * 
+ * + * repeated string excludes = 5; + * + * @return A list containing the excludes. + */ + public com.google.protobuf.ProtocolStringList getExcludesList() { + return excludes_; + } + /** + * + * + *
+     * List of patches to exclude from update.
+     * 
+ * + * repeated string excludes = 5; + * + * @return The count of excludes. + */ + public int getExcludesCount() { + return excludes_.size(); + } + /** + * + * + *
+     * List of patches to exclude from update.
+     * 
+ * + * repeated string excludes = 5; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + public java.lang.String getExcludes(int index) { + return excludes_.get(index); + } + /** + * + * + *
+     * List of patches to exclude from update.
+     * 
+ * + * repeated string excludes = 5; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + public com.google.protobuf.ByteString getExcludesBytes(int index) { + return excludes_.getByteString(index); + } + + public static final int EXCLUSIVE_PATCHES_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList exclusivePatches_; + /** + * + * + *
+     * An exclusive list of patches to be updated. These are the only patches
+     * that will be installed using 'zypper patch patch:<patch_name>' command.
+     * This field must not be used with any other patch configuration fields.
+     * 
+ * + * repeated string exclusive_patches = 6; + * + * @return A list containing the exclusivePatches. + */ + public com.google.protobuf.ProtocolStringList getExclusivePatchesList() { + return exclusivePatches_; + } + /** + * + * + *
+     * An exclusive list of patches to be updated. These are the only patches
+     * that will be installed using 'zypper patch patch:<patch_name>' command.
+     * This field must not be used with any other patch configuration fields.
+     * 
+ * + * repeated string exclusive_patches = 6; + * + * @return The count of exclusivePatches. + */ + public int getExclusivePatchesCount() { + return exclusivePatches_.size(); + } + /** + * + * + *
+     * An exclusive list of patches to be updated. These are the only patches
+     * that will be installed using 'zypper patch patch:<patch_name>' command.
+     * This field must not be used with any other patch configuration fields.
+     * 
+ * + * repeated string exclusive_patches = 6; + * + * @param index The index of the element to return. + * @return The exclusivePatches at the given index. + */ + public java.lang.String getExclusivePatches(int index) { + return exclusivePatches_.get(index); + } + /** + * + * + *
+     * An exclusive list of patches to be updated. These are the only patches
+     * that will be installed using 'zypper patch patch:<patch_name>' command.
+     * This field must not be used with any other patch configuration fields.
+     * 
+ * + * repeated string exclusive_patches = 6; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePatches at the given index. + */ + public com.google.protobuf.ByteString getExclusivePatchesBytes(int index) { + return exclusivePatches_.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 { + if (withOptional_ != false) { + output.writeBool(1, withOptional_); + } + if (withUpdate_ != false) { + output.writeBool(2, withUpdate_); + } + for (int i = 0; i < categories_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, categories_.getRaw(i)); + } + for (int i = 0; i < severities_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, severities_.getRaw(i)); + } + for (int i = 0; i < excludes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, excludes_.getRaw(i)); + } + for (int i = 0; i < exclusivePatches_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, exclusivePatches_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (withOptional_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, withOptional_); + } + if (withUpdate_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, withUpdate_); + } + { + int dataSize = 0; + for (int i = 0; i < categories_.size(); i++) { + dataSize += computeStringSizeNoTag(categories_.getRaw(i)); + } + size += dataSize; + size += 1 * getCategoriesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < severities_.size(); i++) { + dataSize += computeStringSizeNoTag(severities_.getRaw(i)); + } + size += dataSize; + size += 1 * getSeveritiesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < excludes_.size(); i++) { + dataSize += computeStringSizeNoTag(excludes_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < exclusivePatches_.size(); i++) { + dataSize += computeStringSizeNoTag(exclusivePatches_.getRaw(i)); + } + size += dataSize; + size += 1 * getExclusivePatchesList().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.osconfig.v1.PatchJobs.ZypperSettings)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings other = + (com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings) obj; + + if (getWithOptional() != other.getWithOptional()) return false; + if (getWithUpdate() != other.getWithUpdate()) return false; + if (!getCategoriesList().equals(other.getCategoriesList())) return false; + if (!getSeveritiesList().equals(other.getSeveritiesList())) return false; + if (!getExcludesList().equals(other.getExcludesList())) return false; + if (!getExclusivePatchesList().equals(other.getExclusivePatchesList())) 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) + WITH_OPTIONAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWithOptional()); + hash = (37 * hash) + WITH_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWithUpdate()); + if (getCategoriesCount() > 0) { + hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getCategoriesList().hashCode(); + } + if (getSeveritiesCount() > 0) { + hash = (37 * hash) + SEVERITIES_FIELD_NUMBER; + hash = (53 * hash) + getSeveritiesList().hashCode(); + } + if (getExcludesCount() > 0) { + hash = (37 * hash) + EXCLUDES_FIELD_NUMBER; + hash = (53 * hash) + getExcludesList().hashCode(); + } + if (getExclusivePatchesCount() > 0) { + hash = (37 * hash) + EXCLUSIVE_PATCHES_FIELD_NUMBER; + hash = (53 * hash) + getExclusivePatchesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings 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.osconfig.v1.PatchJobs.ZypperSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings 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.osconfig.v1.PatchJobs.ZypperSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings 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.osconfig.v1.PatchJobs.ZypperSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings 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.osconfig.v1.PatchJobs.ZypperSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings 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.osconfig.v1.PatchJobs.ZypperSettings 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; + } + /** + * + * + *
+     * Zypper patching is performed by running `zypper patch`.
+     * See also https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ZypperSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.ZypperSettings) + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ZypperSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ZypperSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.class, + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.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(); + withOptional_ = false; + + withUpdate_ = false; + + categories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + severities_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + exclusivePatches_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ZypperSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings build() { + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings result = + new com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings(this); + int from_bitField0_ = bitField0_; + result.withOptional_ = withOptional_; + result.withUpdate_ = withUpdate_; + if (((bitField0_ & 0x00000001) != 0)) { + categories_ = categories_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.categories_ = categories_; + if (((bitField0_ & 0x00000002) != 0)) { + severities_ = severities_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.severities_ = severities_; + if (((bitField0_ & 0x00000004) != 0)) { + excludes_ = excludes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.excludes_ = excludes_; + if (((bitField0_ & 0x00000008) != 0)) { + exclusivePatches_ = exclusivePatches_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.exclusivePatches_ = exclusivePatches_; + 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.osconfig.v1.PatchJobs.ZypperSettings) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings other) { + if (other == com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings.getDefaultInstance()) + return this; + if (other.getWithOptional() != false) { + setWithOptional(other.getWithOptional()); + } + if (other.getWithUpdate() != false) { + setWithUpdate(other.getWithUpdate()); + } + if (!other.categories_.isEmpty()) { + if (categories_.isEmpty()) { + categories_ = other.categories_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCategoriesIsMutable(); + categories_.addAll(other.categories_); + } + onChanged(); + } + if (!other.severities_.isEmpty()) { + if (severities_.isEmpty()) { + severities_ = other.severities_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSeveritiesIsMutable(); + severities_.addAll(other.severities_); + } + onChanged(); + } + if (!other.excludes_.isEmpty()) { + if (excludes_.isEmpty()) { + excludes_ = other.excludes_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureExcludesIsMutable(); + excludes_.addAll(other.excludes_); + } + onChanged(); + } + if (!other.exclusivePatches_.isEmpty()) { + if (exclusivePatches_.isEmpty()) { + exclusivePatches_ = other.exclusivePatches_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureExclusivePatchesIsMutable(); + exclusivePatches_.addAll(other.exclusivePatches_); + } + 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.osconfig.v1.PatchJobs.ZypperSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private boolean withOptional_; + /** + * + * + *
+       * Adds the `--with-optional` flag to `zypper patch`.
+       * 
+ * + * bool with_optional = 1; + * + * @return The withOptional. + */ + public boolean getWithOptional() { + return withOptional_; + } + /** + * + * + *
+       * Adds the `--with-optional` flag to `zypper patch`.
+       * 
+ * + * bool with_optional = 1; + * + * @param value The withOptional to set. + * @return This builder for chaining. + */ + public Builder setWithOptional(boolean value) { + + withOptional_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Adds the `--with-optional` flag to `zypper patch`.
+       * 
+ * + * bool with_optional = 1; + * + * @return This builder for chaining. + */ + public Builder clearWithOptional() { + + withOptional_ = false; + onChanged(); + return this; + } + + private boolean withUpdate_; + /** + * + * + *
+       * Adds the `--with-update` flag, to `zypper patch`.
+       * 
+ * + * bool with_update = 2; + * + * @return The withUpdate. + */ + public boolean getWithUpdate() { + return withUpdate_; + } + /** + * + * + *
+       * Adds the `--with-update` flag, to `zypper patch`.
+       * 
+ * + * bool with_update = 2; + * + * @param value The withUpdate to set. + * @return This builder for chaining. + */ + public Builder setWithUpdate(boolean value) { + + withUpdate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Adds the `--with-update` flag, to `zypper patch`.
+       * 
+ * + * bool with_update = 2; + * + * @return This builder for chaining. + */ + public Builder clearWithUpdate() { + + withUpdate_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList categories_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCategoriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + categories_ = new com.google.protobuf.LazyStringArrayList(categories_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Install only patches with these categories.
+       * Common categories include security, recommended, and feature.
+       * 
+ * + * repeated string categories = 3; + * + * @return A list containing the categories. + */ + public com.google.protobuf.ProtocolStringList getCategoriesList() { + return categories_.getUnmodifiableView(); + } + /** + * + * + *
+       * Install only patches with these categories.
+       * Common categories include security, recommended, and feature.
+       * 
+ * + * repeated string categories = 3; + * + * @return The count of categories. + */ + public int getCategoriesCount() { + return categories_.size(); + } + /** + * + * + *
+       * Install only patches with these categories.
+       * Common categories include security, recommended, and feature.
+       * 
+ * + * repeated string categories = 3; + * + * @param index The index of the element to return. + * @return The categories at the given index. + */ + public java.lang.String getCategories(int index) { + return categories_.get(index); + } + /** + * + * + *
+       * Install only patches with these categories.
+       * Common categories include security, recommended, and feature.
+       * 
+ * + * repeated string categories = 3; + * + * @param index The index of the value to return. + * @return The bytes of the categories at the given index. + */ + public com.google.protobuf.ByteString getCategoriesBytes(int index) { + return categories_.getByteString(index); + } + /** + * + * + *
+       * Install only patches with these categories.
+       * Common categories include security, recommended, and feature.
+       * 
+ * + * repeated string categories = 3; + * + * @param index The index to set the value at. + * @param value The categories to set. + * @return This builder for chaining. + */ + public Builder setCategories(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Install only patches with these categories.
+       * Common categories include security, recommended, and feature.
+       * 
+ * + * repeated string categories = 3; + * + * @param value The categories to add. + * @return This builder for chaining. + */ + public Builder addCategories(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Install only patches with these categories.
+       * Common categories include security, recommended, and feature.
+       * 
+ * + * repeated string categories = 3; + * + * @param values The categories to add. + * @return This builder for chaining. + */ + public Builder addAllCategories(java.lang.Iterable values) { + ensureCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, categories_); + onChanged(); + return this; + } + /** + * + * + *
+       * Install only patches with these categories.
+       * Common categories include security, recommended, and feature.
+       * 
+ * + * repeated string categories = 3; + * + * @return This builder for chaining. + */ + public Builder clearCategories() { + categories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Install only patches with these categories.
+       * Common categories include security, recommended, and feature.
+       * 
+ * + * repeated string categories = 3; + * + * @param value The bytes of the categories to add. + * @return This builder for chaining. + */ + public Builder addCategoriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCategoriesIsMutable(); + categories_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList severities_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSeveritiesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + severities_ = new com.google.protobuf.LazyStringArrayList(severities_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * Install only patches with these severities.
+       * Common severities include critical, important, moderate, and low.
+       * 
+ * + * repeated string severities = 4; + * + * @return A list containing the severities. + */ + public com.google.protobuf.ProtocolStringList getSeveritiesList() { + return severities_.getUnmodifiableView(); + } + /** + * + * + *
+       * Install only patches with these severities.
+       * Common severities include critical, important, moderate, and low.
+       * 
+ * + * repeated string severities = 4; + * + * @return The count of severities. + */ + public int getSeveritiesCount() { + return severities_.size(); + } + /** + * + * + *
+       * Install only patches with these severities.
+       * Common severities include critical, important, moderate, and low.
+       * 
+ * + * repeated string severities = 4; + * + * @param index The index of the element to return. + * @return The severities at the given index. + */ + public java.lang.String getSeverities(int index) { + return severities_.get(index); + } + /** + * + * + *
+       * Install only patches with these severities.
+       * Common severities include critical, important, moderate, and low.
+       * 
+ * + * repeated string severities = 4; + * + * @param index The index of the value to return. + * @return The bytes of the severities at the given index. + */ + public com.google.protobuf.ByteString getSeveritiesBytes(int index) { + return severities_.getByteString(index); + } + /** + * + * + *
+       * Install only patches with these severities.
+       * Common severities include critical, important, moderate, and low.
+       * 
+ * + * repeated string severities = 4; + * + * @param index The index to set the value at. + * @param value The severities to set. + * @return This builder for chaining. + */ + public Builder setSeverities(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSeveritiesIsMutable(); + severities_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Install only patches with these severities.
+       * Common severities include critical, important, moderate, and low.
+       * 
+ * + * repeated string severities = 4; + * + * @param value The severities to add. + * @return This builder for chaining. + */ + public Builder addSeverities(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSeveritiesIsMutable(); + severities_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Install only patches with these severities.
+       * Common severities include critical, important, moderate, and low.
+       * 
+ * + * repeated string severities = 4; + * + * @param values The severities to add. + * @return This builder for chaining. + */ + public Builder addAllSeverities(java.lang.Iterable values) { + ensureSeveritiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, severities_); + onChanged(); + return this; + } + /** + * + * + *
+       * Install only patches with these severities.
+       * Common severities include critical, important, moderate, and low.
+       * 
+ * + * repeated string severities = 4; + * + * @return This builder for chaining. + */ + public Builder clearSeverities() { + severities_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Install only patches with these severities.
+       * Common severities include critical, important, moderate, and low.
+       * 
+ * + * repeated string severities = 4; + * + * @param value The bytes of the severities to add. + * @return This builder for chaining. + */ + public Builder addSeveritiesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSeveritiesIsMutable(); + severities_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList excludes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureExcludesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + excludes_ = new com.google.protobuf.LazyStringArrayList(excludes_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+       * List of patches to exclude from update.
+       * 
+ * + * repeated string excludes = 5; + * + * @return A list containing the excludes. + */ + public com.google.protobuf.ProtocolStringList getExcludesList() { + return excludes_.getUnmodifiableView(); + } + /** + * + * + *
+       * List of patches to exclude from update.
+       * 
+ * + * repeated string excludes = 5; + * + * @return The count of excludes. + */ + public int getExcludesCount() { + return excludes_.size(); + } + /** + * + * + *
+       * List of patches to exclude from update.
+       * 
+ * + * repeated string excludes = 5; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + public java.lang.String getExcludes(int index) { + return excludes_.get(index); + } + /** + * + * + *
+       * List of patches to exclude from update.
+       * 
+ * + * repeated string excludes = 5; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + public com.google.protobuf.ByteString getExcludesBytes(int index) { + return excludes_.getByteString(index); + } + /** + * + * + *
+       * List of patches to exclude from update.
+       * 
+ * + * repeated string excludes = 5; + * + * @param index The index to set the value at. + * @param value The excludes to set. + * @return This builder for chaining. + */ + public Builder setExcludes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludesIsMutable(); + excludes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of patches to exclude from update.
+       * 
+ * + * repeated string excludes = 5; + * + * @param value The excludes to add. + * @return This builder for chaining. + */ + public Builder addExcludes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludesIsMutable(); + excludes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of patches to exclude from update.
+       * 
+ * + * repeated string excludes = 5; + * + * @param values The excludes to add. + * @return This builder for chaining. + */ + public Builder addAllExcludes(java.lang.Iterable values) { + ensureExcludesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludes_); + onChanged(); + return this; + } + /** + * + * + *
+       * List of patches to exclude from update.
+       * 
+ * + * repeated string excludes = 5; + * + * @return This builder for chaining. + */ + public Builder clearExcludes() { + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * List of patches to exclude from update.
+       * 
+ * + * repeated string excludes = 5; + * + * @param value The bytes of the excludes to add. + * @return This builder for chaining. + */ + public Builder addExcludesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludesIsMutable(); + excludes_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList exclusivePatches_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureExclusivePatchesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + exclusivePatches_ = new com.google.protobuf.LazyStringArrayList(exclusivePatches_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+       * An exclusive list of patches to be updated. These are the only patches
+       * that will be installed using 'zypper patch patch:<patch_name>' command.
+       * This field must not be used with any other patch configuration fields.
+       * 
+ * + * repeated string exclusive_patches = 6; + * + * @return A list containing the exclusivePatches. + */ + public com.google.protobuf.ProtocolStringList getExclusivePatchesList() { + return exclusivePatches_.getUnmodifiableView(); + } + /** + * + * + *
+       * An exclusive list of patches to be updated. These are the only patches
+       * that will be installed using 'zypper patch patch:<patch_name>' command.
+       * This field must not be used with any other patch configuration fields.
+       * 
+ * + * repeated string exclusive_patches = 6; + * + * @return The count of exclusivePatches. + */ + public int getExclusivePatchesCount() { + return exclusivePatches_.size(); + } + /** + * + * + *
+       * An exclusive list of patches to be updated. These are the only patches
+       * that will be installed using 'zypper patch patch:<patch_name>' command.
+       * This field must not be used with any other patch configuration fields.
+       * 
+ * + * repeated string exclusive_patches = 6; + * + * @param index The index of the element to return. + * @return The exclusivePatches at the given index. + */ + public java.lang.String getExclusivePatches(int index) { + return exclusivePatches_.get(index); + } + /** + * + * + *
+       * An exclusive list of patches to be updated. These are the only patches
+       * that will be installed using 'zypper patch patch:<patch_name>' command.
+       * This field must not be used with any other patch configuration fields.
+       * 
+ * + * repeated string exclusive_patches = 6; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePatches at the given index. + */ + public com.google.protobuf.ByteString getExclusivePatchesBytes(int index) { + return exclusivePatches_.getByteString(index); + } + /** + * + * + *
+       * An exclusive list of patches to be updated. These are the only patches
+       * that will be installed using 'zypper patch patch:<patch_name>' command.
+       * This field must not be used with any other patch configuration fields.
+       * 
+ * + * repeated string exclusive_patches = 6; + * + * @param index The index to set the value at. + * @param value The exclusivePatches to set. + * @return This builder for chaining. + */ + public Builder setExclusivePatches(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusivePatchesIsMutable(); + exclusivePatches_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of patches to be updated. These are the only patches
+       * that will be installed using 'zypper patch patch:<patch_name>' command.
+       * This field must not be used with any other patch configuration fields.
+       * 
+ * + * repeated string exclusive_patches = 6; + * + * @param value The exclusivePatches to add. + * @return This builder for chaining. + */ + public Builder addExclusivePatches(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusivePatchesIsMutable(); + exclusivePatches_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of patches to be updated. These are the only patches
+       * that will be installed using 'zypper patch patch:<patch_name>' command.
+       * This field must not be used with any other patch configuration fields.
+       * 
+ * + * repeated string exclusive_patches = 6; + * + * @param values The exclusivePatches to add. + * @return This builder for chaining. + */ + public Builder addAllExclusivePatches(java.lang.Iterable values) { + ensureExclusivePatchesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exclusivePatches_); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of patches to be updated. These are the only patches
+       * that will be installed using 'zypper patch patch:<patch_name>' command.
+       * This field must not be used with any other patch configuration fields.
+       * 
+ * + * repeated string exclusive_patches = 6; + * + * @return This builder for chaining. + */ + public Builder clearExclusivePatches() { + exclusivePatches_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of patches to be updated. These are the only patches
+       * that will be installed using 'zypper patch patch:<patch_name>' command.
+       * This field must not be used with any other patch configuration fields.
+       * 
+ * + * repeated string exclusive_patches = 6; + * + * @param value The bytes of the exclusivePatches to add. + * @return This builder for chaining. + */ + public Builder addExclusivePatchesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExclusivePatchesIsMutable(); + exclusivePatches_.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.osconfig.v1.ZypperSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.ZypperSettings) + private static final com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ZypperSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ZypperSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ZypperSettings(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.osconfig.v1.PatchJobs.ZypperSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WindowsUpdateSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.WindowsUpdateSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return A list containing the classifications. + */ + java.util.List + getClassificationsList(); + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return The count of classifications. + */ + int getClassificationsCount(); + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param index The index of the element to return. + * @return The classifications at the given index. + */ + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification getClassifications( + int index); + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return A list containing the enum numeric values on the wire for classifications. + */ + java.util.List getClassificationsValueList(); + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of classifications at the given index. + */ + int getClassificationsValue(int index); + + /** + * + * + *
+     * List of KBs to exclude from update.
+     * 
+ * + * repeated string excludes = 2; + * + * @return A list containing the excludes. + */ + java.util.List getExcludesList(); + /** + * + * + *
+     * List of KBs to exclude from update.
+     * 
+ * + * repeated string excludes = 2; + * + * @return The count of excludes. + */ + int getExcludesCount(); + /** + * + * + *
+     * List of KBs to exclude from update.
+     * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + java.lang.String getExcludes(int index); + /** + * + * + *
+     * List of KBs to exclude from update.
+     * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + com.google.protobuf.ByteString getExcludesBytes(int index); + + /** + * + * + *
+     * An exclusive list of kbs to be updated. These are the only patches
+     * that will be updated. This field must not be used with other
+     * patch configurations.
+     * 
+ * + * repeated string exclusive_patches = 3; + * + * @return A list containing the exclusivePatches. + */ + java.util.List getExclusivePatchesList(); + /** + * + * + *
+     * An exclusive list of kbs to be updated. These are the only patches
+     * that will be updated. This field must not be used with other
+     * patch configurations.
+     * 
+ * + * repeated string exclusive_patches = 3; + * + * @return The count of exclusivePatches. + */ + int getExclusivePatchesCount(); + /** + * + * + *
+     * An exclusive list of kbs to be updated. These are the only patches
+     * that will be updated. This field must not be used with other
+     * patch configurations.
+     * 
+ * + * repeated string exclusive_patches = 3; + * + * @param index The index of the element to return. + * @return The exclusivePatches at the given index. + */ + java.lang.String getExclusivePatches(int index); + /** + * + * + *
+     * An exclusive list of kbs to be updated. These are the only patches
+     * that will be updated. This field must not be used with other
+     * patch configurations.
+     * 
+ * + * repeated string exclusive_patches = 3; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePatches at the given index. + */ + com.google.protobuf.ByteString getExclusivePatchesBytes(int index); + } + /** + * + * + *
+   * Windows patching is performed using the Windows Update Agent.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.WindowsUpdateSettings} + */ + public static final class WindowsUpdateSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.WindowsUpdateSettings) + WindowsUpdateSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use WindowsUpdateSettings.newBuilder() to construct. + private WindowsUpdateSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WindowsUpdateSettings() { + classifications_ = java.util.Collections.emptyList(); + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + exclusivePatches_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WindowsUpdateSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WindowsUpdateSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + classifications_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + classifications_.add(rawValue); + break; + } + case 10: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + classifications_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + classifications_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + excludes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + excludes_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + exclusivePatches_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + exclusivePatches_.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)) { + classifications_ = java.util.Collections.unmodifiableList(classifications_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + excludes_ = excludes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + exclusivePatches_ = exclusivePatches_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_WindowsUpdateSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_WindowsUpdateSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.class, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Builder.class); + } + + /** + * + * + *
+     * Microsoft Windows update classifications as defined in
+     * [1]
+     * https://support.microsoft.com/en-us/help/824684/description-of-the-standard-terminology-that-is-used-to-describe-micro
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1.WindowsUpdateSettings.Classification} + */ + public enum Classification implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Invalid. If classifications are included, they must be specified.
+       * 
+ * + * CLASSIFICATION_UNSPECIFIED = 0; + */ + CLASSIFICATION_UNSPECIFIED(0), + /** + * + * + *
+       * "A widely released fix for a specific problem that addresses a critical,
+       * non-security-related bug." [1]
+       * 
+ * + * CRITICAL = 1; + */ + CRITICAL(1), + /** + * + * + *
+       * "A widely released fix for a product-specific, security-related
+       * vulnerability. Security vulnerabilities are rated by their severity. The
+       * severity rating is indicated in the Microsoft security bulletin as
+       * critical, important, moderate, or low." [1]
+       * 
+ * + * SECURITY = 2; + */ + SECURITY(2), + /** + * + * + *
+       * "A widely released and frequent software update that contains additions
+       * to a product's definition database. Definition databases are often used
+       * to detect objects that have specific attributes, such as malicious code,
+       * phishing websites, or junk mail." [1]
+       * 
+ * + * DEFINITION = 3; + */ + DEFINITION(3), + /** + * + * + *
+       * "Software that controls the input and output of a device." [1]
+       * 
+ * + * DRIVER = 4; + */ + DRIVER(4), + /** + * + * + *
+       * "New product functionality that is first distributed outside the context
+       * of a product release and that is typically included in the next full
+       * product release." [1]
+       * 
+ * + * FEATURE_PACK = 5; + */ + FEATURE_PACK(5), + /** + * + * + *
+       * "A tested, cumulative set of all hotfixes, security updates, critical
+       * updates, and updates. Additionally, service packs may contain additional
+       * fixes for problems that are found internally since the release of the
+       * product. Service packs my also contain a limited number of
+       * customer-requested design changes or features." [1]
+       * 
+ * + * SERVICE_PACK = 6; + */ + SERVICE_PACK(6), + /** + * + * + *
+       * "A utility or feature that helps complete a task or set of tasks." [1]
+       * 
+ * + * TOOL = 7; + */ + TOOL(7), + /** + * + * + *
+       * "A tested, cumulative set of hotfixes, security updates, critical
+       * updates, and updates that are packaged together for easy deployment. A
+       * rollup generally targets a specific area, such as security, or a
+       * component of a product, such as Internet Information Services (IIS)." [1]
+       * 
+ * + * UPDATE_ROLLUP = 8; + */ + UPDATE_ROLLUP(8), + /** + * + * + *
+       * "A widely released fix for a specific problem. An update addresses a
+       * noncritical, non-security-related bug." [1]
+       * 
+ * + * UPDATE = 9; + */ + UPDATE(9), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Invalid. If classifications are included, they must be specified.
+       * 
+ * + * CLASSIFICATION_UNSPECIFIED = 0; + */ + public static final int CLASSIFICATION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * "A widely released fix for a specific problem that addresses a critical,
+       * non-security-related bug." [1]
+       * 
+ * + * CRITICAL = 1; + */ + public static final int CRITICAL_VALUE = 1; + /** + * + * + *
+       * "A widely released fix for a product-specific, security-related
+       * vulnerability. Security vulnerabilities are rated by their severity. The
+       * severity rating is indicated in the Microsoft security bulletin as
+       * critical, important, moderate, or low." [1]
+       * 
+ * + * SECURITY = 2; + */ + public static final int SECURITY_VALUE = 2; + /** + * + * + *
+       * "A widely released and frequent software update that contains additions
+       * to a product's definition database. Definition databases are often used
+       * to detect objects that have specific attributes, such as malicious code,
+       * phishing websites, or junk mail." [1]
+       * 
+ * + * DEFINITION = 3; + */ + public static final int DEFINITION_VALUE = 3; + /** + * + * + *
+       * "Software that controls the input and output of a device." [1]
+       * 
+ * + * DRIVER = 4; + */ + public static final int DRIVER_VALUE = 4; + /** + * + * + *
+       * "New product functionality that is first distributed outside the context
+       * of a product release and that is typically included in the next full
+       * product release." [1]
+       * 
+ * + * FEATURE_PACK = 5; + */ + public static final int FEATURE_PACK_VALUE = 5; + /** + * + * + *
+       * "A tested, cumulative set of all hotfixes, security updates, critical
+       * updates, and updates. Additionally, service packs may contain additional
+       * fixes for problems that are found internally since the release of the
+       * product. Service packs my also contain a limited number of
+       * customer-requested design changes or features." [1]
+       * 
+ * + * SERVICE_PACK = 6; + */ + public static final int SERVICE_PACK_VALUE = 6; + /** + * + * + *
+       * "A utility or feature that helps complete a task or set of tasks." [1]
+       * 
+ * + * TOOL = 7; + */ + public static final int TOOL_VALUE = 7; + /** + * + * + *
+       * "A tested, cumulative set of hotfixes, security updates, critical
+       * updates, and updates that are packaged together for easy deployment. A
+       * rollup generally targets a specific area, such as security, or a
+       * component of a product, such as Internet Information Services (IIS)." [1]
+       * 
+ * + * UPDATE_ROLLUP = 8; + */ + public static final int UPDATE_ROLLUP_VALUE = 8; + /** + * + * + *
+       * "A widely released fix for a specific problem. An update addresses a
+       * noncritical, non-security-related bug." [1]
+       * 
+ * + * UPDATE = 9; + */ + public static final int UPDATE_VALUE = 9; + + 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 Classification 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 Classification forNumber(int value) { + switch (value) { + case 0: + return CLASSIFICATION_UNSPECIFIED; + case 1: + return CRITICAL; + case 2: + return SECURITY; + case 3: + return DEFINITION; + case 4: + return DRIVER; + case 5: + return FEATURE_PACK; + case 6: + return SERVICE_PACK; + case 7: + return TOOL; + case 8: + return UPDATE_ROLLUP; + case 9: + return UPDATE; + 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 Classification findValueByNumber(int number) { + return Classification.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.osconfig.v1.PatchJobs.WindowsUpdateSettings.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Classification[] VALUES = values(); + + public static Classification 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 Classification(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1.WindowsUpdateSettings.Classification) + } + + public static final int CLASSIFICATIONS_FIELD_NUMBER = 1; + private java.util.List classifications_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification> + classifications_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification>() { + public com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification + convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification result = + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification + .valueOf(from); + return result == null + ? com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification + .UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return A list containing the classifications. + */ + public java.util.List< + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification> + getClassificationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification>( + classifications_, classifications_converter_); + } + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return The count of classifications. + */ + public int getClassificationsCount() { + return classifications_.size(); + } + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param index The index of the element to return. + * @return The classifications at the given index. + */ + public com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification + getClassifications(int index) { + return classifications_converter_.convert(classifications_.get(index)); + } + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return A list containing the enum numeric values on the wire for classifications. + */ + public java.util.List getClassificationsValueList() { + return classifications_; + } + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of classifications at the given index. + */ + public int getClassificationsValue(int index) { + return classifications_.get(index); + } + + private int classificationsMemoizedSerializedSize; + + public static final int EXCLUDES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList excludes_; + /** + * + * + *
+     * List of KBs to exclude from update.
+     * 
+ * + * repeated string excludes = 2; + * + * @return A list containing the excludes. + */ + public com.google.protobuf.ProtocolStringList getExcludesList() { + return excludes_; + } + /** + * + * + *
+     * List of KBs to exclude from update.
+     * 
+ * + * repeated string excludes = 2; + * + * @return The count of excludes. + */ + public int getExcludesCount() { + return excludes_.size(); + } + /** + * + * + *
+     * List of KBs to exclude from update.
+     * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + public java.lang.String getExcludes(int index) { + return excludes_.get(index); + } + /** + * + * + *
+     * List of KBs to exclude from update.
+     * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + public com.google.protobuf.ByteString getExcludesBytes(int index) { + return excludes_.getByteString(index); + } + + public static final int EXCLUSIVE_PATCHES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList exclusivePatches_; + /** + * + * + *
+     * An exclusive list of kbs to be updated. These are the only patches
+     * that will be updated. This field must not be used with other
+     * patch configurations.
+     * 
+ * + * repeated string exclusive_patches = 3; + * + * @return A list containing the exclusivePatches. + */ + public com.google.protobuf.ProtocolStringList getExclusivePatchesList() { + return exclusivePatches_; + } + /** + * + * + *
+     * An exclusive list of kbs to be updated. These are the only patches
+     * that will be updated. This field must not be used with other
+     * patch configurations.
+     * 
+ * + * repeated string exclusive_patches = 3; + * + * @return The count of exclusivePatches. + */ + public int getExclusivePatchesCount() { + return exclusivePatches_.size(); + } + /** + * + * + *
+     * An exclusive list of kbs to be updated. These are the only patches
+     * that will be updated. This field must not be used with other
+     * patch configurations.
+     * 
+ * + * repeated string exclusive_patches = 3; + * + * @param index The index of the element to return. + * @return The exclusivePatches at the given index. + */ + public java.lang.String getExclusivePatches(int index) { + return exclusivePatches_.get(index); + } + /** + * + * + *
+     * An exclusive list of kbs to be updated. These are the only patches
+     * that will be updated. This field must not be used with other
+     * patch configurations.
+     * 
+ * + * repeated string exclusive_patches = 3; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePatches at the given index. + */ + public com.google.protobuf.ByteString getExclusivePatchesBytes(int index) { + return exclusivePatches_.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 { + getSerializedSize(); + if (getClassificationsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(classificationsMemoizedSerializedSize); + } + for (int i = 0; i < classifications_.size(); i++) { + output.writeEnumNoTag(classifications_.get(i)); + } + for (int i = 0; i < excludes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, excludes_.getRaw(i)); + } + for (int i = 0; i < exclusivePatches_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, exclusivePatches_.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 < classifications_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(classifications_.get(i)); + } + size += dataSize; + if (!getClassificationsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + classificationsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < excludes_.size(); i++) { + dataSize += computeStringSizeNoTag(excludes_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < exclusivePatches_.size(); i++) { + dataSize += computeStringSizeNoTag(exclusivePatches_.getRaw(i)); + } + size += dataSize; + size += 1 * getExclusivePatchesList().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.osconfig.v1.PatchJobs.WindowsUpdateSettings)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings other = + (com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings) obj; + + if (!classifications_.equals(other.classifications_)) return false; + if (!getExcludesList().equals(other.getExcludesList())) return false; + if (!getExclusivePatchesList().equals(other.getExclusivePatchesList())) 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 (getClassificationsCount() > 0) { + hash = (37 * hash) + CLASSIFICATIONS_FIELD_NUMBER; + hash = (53 * hash) + classifications_.hashCode(); + } + if (getExcludesCount() > 0) { + hash = (37 * hash) + EXCLUDES_FIELD_NUMBER; + hash = (53 * hash) + getExcludesList().hashCode(); + } + if (getExclusivePatchesCount() > 0) { + hash = (37 * hash) + EXCLUSIVE_PATCHES_FIELD_NUMBER; + hash = (53 * hash) + getExclusivePatchesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings 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.osconfig.v1.PatchJobs.WindowsUpdateSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings 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.osconfig.v1.PatchJobs.WindowsUpdateSettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings 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.osconfig.v1.PatchJobs.WindowsUpdateSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings 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.osconfig.v1.PatchJobs.WindowsUpdateSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings 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.osconfig.v1.PatchJobs.WindowsUpdateSettings 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; + } + /** + * + * + *
+     * Windows patching is performed using the Windows Update Agent.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.WindowsUpdateSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.WindowsUpdateSettings) + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_WindowsUpdateSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_WindowsUpdateSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.class, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.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(); + classifications_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + exclusivePatches_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_WindowsUpdateSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings build() { + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings result = + new com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + classifications_ = java.util.Collections.unmodifiableList(classifications_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.classifications_ = classifications_; + if (((bitField0_ & 0x00000002) != 0)) { + excludes_ = excludes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.excludes_ = excludes_; + if (((bitField0_ & 0x00000004) != 0)) { + exclusivePatches_ = exclusivePatches_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.exclusivePatches_ = exclusivePatches_; + 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.osconfig.v1.PatchJobs.WindowsUpdateSettings) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings other) { + if (other + == com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.getDefaultInstance()) + return this; + if (!other.classifications_.isEmpty()) { + if (classifications_.isEmpty()) { + classifications_ = other.classifications_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureClassificationsIsMutable(); + classifications_.addAll(other.classifications_); + } + onChanged(); + } + if (!other.excludes_.isEmpty()) { + if (excludes_.isEmpty()) { + excludes_ = other.excludes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureExcludesIsMutable(); + excludes_.addAll(other.excludes_); + } + onChanged(); + } + if (!other.exclusivePatches_.isEmpty()) { + if (exclusivePatches_.isEmpty()) { + exclusivePatches_ = other.exclusivePatches_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureExclusivePatchesIsMutable(); + exclusivePatches_.addAll(other.exclusivePatches_); + } + 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.osconfig.v1.PatchJobs.WindowsUpdateSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List classifications_ = + java.util.Collections.emptyList(); + + private void ensureClassificationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + classifications_ = new java.util.ArrayList(classifications_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return A list containing the classifications. + */ + public java.util.List< + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification> + getClassificationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification>( + classifications_, classifications_converter_); + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return The count of classifications. + */ + public int getClassificationsCount() { + return classifications_.size(); + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param index The index of the element to return. + * @return The classifications at the given index. + */ + public com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification + getClassifications(int index) { + return classifications_converter_.convert(classifications_.get(index)); + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param index The index to set the value at. + * @param value The classifications to set. + * @return This builder for chaining. + */ + public Builder setClassifications( + int index, + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClassificationsIsMutable(); + classifications_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param value The classifications to add. + * @return This builder for chaining. + */ + public Builder addClassifications( + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClassificationsIsMutable(); + classifications_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param values The classifications to add. + * @return This builder for chaining. + */ + public Builder addAllClassifications( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification> + values) { + ensureClassificationsIsMutable(); + for (com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings.Classification value : + values) { + classifications_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearClassifications() { + classifications_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return A list containing the enum numeric values on the wire for classifications. + */ + public java.util.List getClassificationsValueList() { + return java.util.Collections.unmodifiableList(classifications_); + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of classifications at the given index. + */ + public int getClassificationsValue(int index) { + return classifications_.get(index); + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of classifications at the given index. + * @return This builder for chaining. + */ + public Builder setClassificationsValue(int index, int value) { + ensureClassificationsIsMutable(); + classifications_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param value The enum numeric value on the wire for classifications to add. + * @return This builder for chaining. + */ + public Builder addClassificationsValue(int value) { + ensureClassificationsIsMutable(); + classifications_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param values The enum numeric values on the wire for classifications to add. + * @return This builder for chaining. + */ + public Builder addAllClassificationsValue(java.lang.Iterable values) { + ensureClassificationsIsMutable(); + for (int value : values) { + classifications_.add(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList excludes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureExcludesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + excludes_ = new com.google.protobuf.LazyStringArrayList(excludes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * List of KBs to exclude from update.
+       * 
+ * + * repeated string excludes = 2; + * + * @return A list containing the excludes. + */ + public com.google.protobuf.ProtocolStringList getExcludesList() { + return excludes_.getUnmodifiableView(); + } + /** + * + * + *
+       * List of KBs to exclude from update.
+       * 
+ * + * repeated string excludes = 2; + * + * @return The count of excludes. + */ + public int getExcludesCount() { + return excludes_.size(); + } + /** + * + * + *
+       * List of KBs to exclude from update.
+       * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the element to return. + * @return The excludes at the given index. + */ + public java.lang.String getExcludes(int index) { + return excludes_.get(index); + } + /** + * + * + *
+       * List of KBs to exclude from update.
+       * 
+ * + * repeated string excludes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the excludes at the given index. + */ + public com.google.protobuf.ByteString getExcludesBytes(int index) { + return excludes_.getByteString(index); + } + /** + * + * + *
+       * List of KBs to exclude from update.
+       * 
+ * + * repeated string excludes = 2; + * + * @param index The index to set the value at. + * @param value The excludes to set. + * @return This builder for chaining. + */ + public Builder setExcludes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludesIsMutable(); + excludes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of KBs to exclude from update.
+       * 
+ * + * repeated string excludes = 2; + * + * @param value The excludes to add. + * @return This builder for chaining. + */ + public Builder addExcludes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludesIsMutable(); + excludes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of KBs to exclude from update.
+       * 
+ * + * repeated string excludes = 2; + * + * @param values The excludes to add. + * @return This builder for chaining. + */ + public Builder addAllExcludes(java.lang.Iterable values) { + ensureExcludesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludes_); + onChanged(); + return this; + } + /** + * + * + *
+       * List of KBs to exclude from update.
+       * 
+ * + * repeated string excludes = 2; + * + * @return This builder for chaining. + */ + public Builder clearExcludes() { + excludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * List of KBs to exclude from update.
+       * 
+ * + * repeated string excludes = 2; + * + * @param value The bytes of the excludes to add. + * @return This builder for chaining. + */ + public Builder addExcludesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludesIsMutable(); + excludes_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList exclusivePatches_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureExclusivePatchesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + exclusivePatches_ = new com.google.protobuf.LazyStringArrayList(exclusivePatches_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+       * An exclusive list of kbs to be updated. These are the only patches
+       * that will be updated. This field must not be used with other
+       * patch configurations.
+       * 
+ * + * repeated string exclusive_patches = 3; + * + * @return A list containing the exclusivePatches. + */ + public com.google.protobuf.ProtocolStringList getExclusivePatchesList() { + return exclusivePatches_.getUnmodifiableView(); + } + /** + * + * + *
+       * An exclusive list of kbs to be updated. These are the only patches
+       * that will be updated. This field must not be used with other
+       * patch configurations.
+       * 
+ * + * repeated string exclusive_patches = 3; + * + * @return The count of exclusivePatches. + */ + public int getExclusivePatchesCount() { + return exclusivePatches_.size(); + } + /** + * + * + *
+       * An exclusive list of kbs to be updated. These are the only patches
+       * that will be updated. This field must not be used with other
+       * patch configurations.
+       * 
+ * + * repeated string exclusive_patches = 3; + * + * @param index The index of the element to return. + * @return The exclusivePatches at the given index. + */ + public java.lang.String getExclusivePatches(int index) { + return exclusivePatches_.get(index); + } + /** + * + * + *
+       * An exclusive list of kbs to be updated. These are the only patches
+       * that will be updated. This field must not be used with other
+       * patch configurations.
+       * 
+ * + * repeated string exclusive_patches = 3; + * + * @param index The index of the value to return. + * @return The bytes of the exclusivePatches at the given index. + */ + public com.google.protobuf.ByteString getExclusivePatchesBytes(int index) { + return exclusivePatches_.getByteString(index); + } + /** + * + * + *
+       * An exclusive list of kbs to be updated. These are the only patches
+       * that will be updated. This field must not be used with other
+       * patch configurations.
+       * 
+ * + * repeated string exclusive_patches = 3; + * + * @param index The index to set the value at. + * @param value The exclusivePatches to set. + * @return This builder for chaining. + */ + public Builder setExclusivePatches(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusivePatchesIsMutable(); + exclusivePatches_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of kbs to be updated. These are the only patches
+       * that will be updated. This field must not be used with other
+       * patch configurations.
+       * 
+ * + * repeated string exclusive_patches = 3; + * + * @param value The exclusivePatches to add. + * @return This builder for chaining. + */ + public Builder addExclusivePatches(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusivePatchesIsMutable(); + exclusivePatches_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of kbs to be updated. These are the only patches
+       * that will be updated. This field must not be used with other
+       * patch configurations.
+       * 
+ * + * repeated string exclusive_patches = 3; + * + * @param values The exclusivePatches to add. + * @return This builder for chaining. + */ + public Builder addAllExclusivePatches(java.lang.Iterable values) { + ensureExclusivePatchesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exclusivePatches_); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of kbs to be updated. These are the only patches
+       * that will be updated. This field must not be used with other
+       * patch configurations.
+       * 
+ * + * repeated string exclusive_patches = 3; + * + * @return This builder for chaining. + */ + public Builder clearExclusivePatches() { + exclusivePatches_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * An exclusive list of kbs to be updated. These are the only patches
+       * that will be updated. This field must not be used with other
+       * patch configurations.
+       * 
+ * + * repeated string exclusive_patches = 3; + * + * @param value The bytes of the exclusivePatches to add. + * @return This builder for chaining. + */ + public Builder addExclusivePatchesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExclusivePatchesIsMutable(); + exclusivePatches_.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.osconfig.v1.WindowsUpdateSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.WindowsUpdateSettings) + private static final com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.WindowsUpdateSettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WindowsUpdateSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WindowsUpdateSettings(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.osconfig.v1.PatchJobs.WindowsUpdateSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExecStepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.ExecStep) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + * + * @return Whether the linuxExecStepConfig field is set. + */ + boolean hasLinuxExecStepConfig(); + /** + * + * + *
+     * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + * + * @return The linuxExecStepConfig. + */ + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig getLinuxExecStepConfig(); + /** + * + * + *
+     * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + */ + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder + getLinuxExecStepConfigOrBuilder(); + + /** + * + * + *
+     * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + * + * @return Whether the windowsExecStepConfig field is set. + */ + boolean hasWindowsExecStepConfig(); + /** + * + * + *
+     * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + * + * @return The windowsExecStepConfig. + */ + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig getWindowsExecStepConfig(); + /** + * + * + *
+     * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + */ + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder + getWindowsExecStepConfigOrBuilder(); + } + /** + * + * + *
+   * A step that runs an executable for a PatchJob.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ExecStep} + */ + public static final class ExecStep extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.ExecStep) + ExecStepOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecStep.newBuilder() to construct. + private ExecStep(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecStep() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecStep(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExecStep( + 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.osconfig.v1.PatchJobs.ExecStepConfig.Builder subBuilder = null; + if (linuxExecStepConfig_ != null) { + subBuilder = linuxExecStepConfig_.toBuilder(); + } + linuxExecStepConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(linuxExecStepConfig_); + linuxExecStepConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder subBuilder = null; + if (windowsExecStepConfig_ != null) { + subBuilder = windowsExecStepConfig_.toBuilder(); + } + windowsExecStepConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(windowsExecStepConfig_); + windowsExecStepConfig_ = 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.class, + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder.class); + } + + public static final int LINUX_EXEC_STEP_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig linuxExecStepConfig_; + /** + * + * + *
+     * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + * + * @return Whether the linuxExecStepConfig field is set. + */ + public boolean hasLinuxExecStepConfig() { + return linuxExecStepConfig_ != null; + } + /** + * + * + *
+     * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + * + * @return The linuxExecStepConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig getLinuxExecStepConfig() { + return linuxExecStepConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.getDefaultInstance() + : linuxExecStepConfig_; + } + /** + * + * + *
+     * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder + getLinuxExecStepConfigOrBuilder() { + return getLinuxExecStepConfig(); + } + + public static final int WINDOWS_EXEC_STEP_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig windowsExecStepConfig_; + /** + * + * + *
+     * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + * + * @return Whether the windowsExecStepConfig field is set. + */ + public boolean hasWindowsExecStepConfig() { + return windowsExecStepConfig_ != null; + } + /** + * + * + *
+     * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + * + * @return The windowsExecStepConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig getWindowsExecStepConfig() { + return windowsExecStepConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.getDefaultInstance() + : windowsExecStepConfig_; + } + /** + * + * + *
+     * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder + getWindowsExecStepConfigOrBuilder() { + return getWindowsExecStepConfig(); + } + + 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 (linuxExecStepConfig_ != null) { + output.writeMessage(1, getLinuxExecStepConfig()); + } + if (windowsExecStepConfig_ != null) { + output.writeMessage(2, getWindowsExecStepConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (linuxExecStepConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLinuxExecStepConfig()); + } + if (windowsExecStepConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWindowsExecStepConfig()); + } + 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.osconfig.v1.PatchJobs.ExecStep)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.ExecStep other = + (com.google.cloud.osconfig.v1.PatchJobs.ExecStep) obj; + + if (hasLinuxExecStepConfig() != other.hasLinuxExecStepConfig()) return false; + if (hasLinuxExecStepConfig()) { + if (!getLinuxExecStepConfig().equals(other.getLinuxExecStepConfig())) return false; + } + if (hasWindowsExecStepConfig() != other.hasWindowsExecStepConfig()) return false; + if (hasWindowsExecStepConfig()) { + if (!getWindowsExecStepConfig().equals(other.getWindowsExecStepConfig())) 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 (hasLinuxExecStepConfig()) { + hash = (37 * hash) + LINUX_EXEC_STEP_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLinuxExecStepConfig().hashCode(); + } + if (hasWindowsExecStepConfig()) { + hash = (37 * hash) + WINDOWS_EXEC_STEP_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getWindowsExecStepConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStep parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStep 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.osconfig.v1.PatchJobs.ExecStep parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStep 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.osconfig.v1.PatchJobs.ExecStep parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStep parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStep parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStep 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.osconfig.v1.PatchJobs.ExecStep parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStep 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.osconfig.v1.PatchJobs.ExecStep parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStep 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.osconfig.v1.PatchJobs.ExecStep 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 step that runs an executable for a PatchJob.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ExecStep} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.ExecStep) + com.google.cloud.osconfig.v1.PatchJobs.ExecStepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.class, + com.google.cloud.osconfig.v1.PatchJobs.ExecStep.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.ExecStep.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 (linuxExecStepConfigBuilder_ == null) { + linuxExecStepConfig_ = null; + } else { + linuxExecStepConfig_ = null; + linuxExecStepConfigBuilder_ = null; + } + if (windowsExecStepConfigBuilder_ == null) { + windowsExecStepConfig_ = null; + } else { + windowsExecStepConfig_ = null; + windowsExecStepConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecStep_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ExecStep getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.ExecStep.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ExecStep build() { + com.google.cloud.osconfig.v1.PatchJobs.ExecStep result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ExecStep buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.ExecStep result = + new com.google.cloud.osconfig.v1.PatchJobs.ExecStep(this); + if (linuxExecStepConfigBuilder_ == null) { + result.linuxExecStepConfig_ = linuxExecStepConfig_; + } else { + result.linuxExecStepConfig_ = linuxExecStepConfigBuilder_.build(); + } + if (windowsExecStepConfigBuilder_ == null) { + result.windowsExecStepConfig_ = windowsExecStepConfig_; + } else { + result.windowsExecStepConfig_ = windowsExecStepConfigBuilder_.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.osconfig.v1.PatchJobs.ExecStep) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.ExecStep) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.ExecStep other) { + if (other == com.google.cloud.osconfig.v1.PatchJobs.ExecStep.getDefaultInstance()) + return this; + if (other.hasLinuxExecStepConfig()) { + mergeLinuxExecStepConfig(other.getLinuxExecStepConfig()); + } + if (other.hasWindowsExecStepConfig()) { + mergeWindowsExecStepConfig(other.getWindowsExecStepConfig()); + } + 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.osconfig.v1.PatchJobs.ExecStep parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.ExecStep) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig linuxExecStepConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder> + linuxExecStepConfigBuilder_; + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + * + * @return Whether the linuxExecStepConfig field is set. + */ + public boolean hasLinuxExecStepConfig() { + return linuxExecStepConfigBuilder_ != null || linuxExecStepConfig_ != null; + } + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + * + * @return The linuxExecStepConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig getLinuxExecStepConfig() { + if (linuxExecStepConfigBuilder_ == null) { + return linuxExecStepConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.getDefaultInstance() + : linuxExecStepConfig_; + } else { + return linuxExecStepConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + */ + public Builder setLinuxExecStepConfig( + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig value) { + if (linuxExecStepConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linuxExecStepConfig_ = value; + onChanged(); + } else { + linuxExecStepConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + */ + public Builder setLinuxExecStepConfig( + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder builderForValue) { + if (linuxExecStepConfigBuilder_ == null) { + linuxExecStepConfig_ = builderForValue.build(); + onChanged(); + } else { + linuxExecStepConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + */ + public Builder mergeLinuxExecStepConfig( + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig value) { + if (linuxExecStepConfigBuilder_ == null) { + if (linuxExecStepConfig_ != null) { + linuxExecStepConfig_ = + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.newBuilder( + linuxExecStepConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + linuxExecStepConfig_ = value; + } + onChanged(); + } else { + linuxExecStepConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + */ + public Builder clearLinuxExecStepConfig() { + if (linuxExecStepConfigBuilder_ == null) { + linuxExecStepConfig_ = null; + onChanged(); + } else { + linuxExecStepConfig_ = null; + linuxExecStepConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder + getLinuxExecStepConfigBuilder() { + + onChanged(); + return getLinuxExecStepConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder + getLinuxExecStepConfigOrBuilder() { + if (linuxExecStepConfigBuilder_ != null) { + return linuxExecStepConfigBuilder_.getMessageOrBuilder(); + } else { + return linuxExecStepConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.getDefaultInstance() + : linuxExecStepConfig_; + } + } + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder> + getLinuxExecStepConfigFieldBuilder() { + if (linuxExecStepConfigBuilder_ == null) { + linuxExecStepConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder>( + getLinuxExecStepConfig(), getParentForChildren(), isClean()); + linuxExecStepConfig_ = null; + } + return linuxExecStepConfigBuilder_; + } + + private com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig windowsExecStepConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder> + windowsExecStepConfigBuilder_; + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + * + * @return Whether the windowsExecStepConfig field is set. + */ + public boolean hasWindowsExecStepConfig() { + return windowsExecStepConfigBuilder_ != null || windowsExecStepConfig_ != null; + } + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + * + * @return The windowsExecStepConfig. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig getWindowsExecStepConfig() { + if (windowsExecStepConfigBuilder_ == null) { + return windowsExecStepConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.getDefaultInstance() + : windowsExecStepConfig_; + } else { + return windowsExecStepConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + */ + public Builder setWindowsExecStepConfig( + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig value) { + if (windowsExecStepConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + windowsExecStepConfig_ = value; + onChanged(); + } else { + windowsExecStepConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + */ + public Builder setWindowsExecStepConfig( + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder builderForValue) { + if (windowsExecStepConfigBuilder_ == null) { + windowsExecStepConfig_ = builderForValue.build(); + onChanged(); + } else { + windowsExecStepConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + */ + public Builder mergeWindowsExecStepConfig( + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig value) { + if (windowsExecStepConfigBuilder_ == null) { + if (windowsExecStepConfig_ != null) { + windowsExecStepConfig_ = + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.newBuilder( + windowsExecStepConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + windowsExecStepConfig_ = value; + } + onChanged(); + } else { + windowsExecStepConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + */ + public Builder clearWindowsExecStepConfig() { + if (windowsExecStepConfigBuilder_ == null) { + windowsExecStepConfig_ = null; + onChanged(); + } else { + windowsExecStepConfig_ = null; + windowsExecStepConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder + getWindowsExecStepConfigBuilder() { + + onChanged(); + return getWindowsExecStepConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder + getWindowsExecStepConfigOrBuilder() { + if (windowsExecStepConfigBuilder_ != null) { + return windowsExecStepConfigBuilder_.getMessageOrBuilder(); + } else { + return windowsExecStepConfig_ == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.getDefaultInstance() + : windowsExecStepConfig_; + } + } + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder> + getWindowsExecStepConfigFieldBuilder() { + if (windowsExecStepConfigBuilder_ == null) { + windowsExecStepConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder>( + getWindowsExecStepConfig(), getParentForChildren(), isClean()); + windowsExecStepConfig_ = null; + } + return windowsExecStepConfigBuilder_; + } + + @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.osconfig.v1.ExecStep) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.ExecStep) + private static final com.google.cloud.osconfig.v1.PatchJobs.ExecStep DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.ExecStep(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStep getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecStep parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecStep(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.osconfig.v1.PatchJobs.ExecStep getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExecStepConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.ExecStepConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An absolute path to the executable on the VM.
+     * 
+ * + * string local_path = 1; + * + * @return The localPath. + */ + java.lang.String getLocalPath(); + /** + * + * + *
+     * An absolute path to the executable on the VM.
+     * 
+ * + * string local_path = 1; + * + * @return The bytes for localPath. + */ + com.google.protobuf.ByteString getLocalPathBytes(); + + /** + * + * + *
+     * A Google Cloud Storage object containing the executable.
+     * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + * + * @return Whether the gcsObject field is set. + */ + boolean hasGcsObject(); + /** + * + * + *
+     * A Google Cloud Storage object containing the executable.
+     * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + * + * @return The gcsObject. + */ + com.google.cloud.osconfig.v1.PatchJobs.GcsObject getGcsObject(); + /** + * + * + *
+     * A Google Cloud Storage object containing the executable.
+     * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + */ + com.google.cloud.osconfig.v1.PatchJobs.GcsObjectOrBuilder getGcsObjectOrBuilder(); + + /** + * + * + *
+     * Defaults to [0]. A list of possible return values that the
+     * execution can return to indicate a success.
+     * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @return A list containing the allowedSuccessCodes. + */ + java.util.List getAllowedSuccessCodesList(); + /** + * + * + *
+     * Defaults to [0]. A list of possible return values that the
+     * execution can return to indicate a success.
+     * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @return The count of allowedSuccessCodes. + */ + int getAllowedSuccessCodesCount(); + /** + * + * + *
+     * Defaults to [0]. A list of possible return values that the
+     * execution can return to indicate a success.
+     * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @param index The index of the element to return. + * @return The allowedSuccessCodes at the given index. + */ + int getAllowedSuccessCodes(int index); + + /** + * + * + *
+     * The script interpreter to use to run the script. If no interpreter is
+     * specified the script will be executed directly, which will likely
+     * only succeed for scripts with [shebang lines]
+     * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + * + * @return The enum numeric value on the wire for interpreter. + */ + int getInterpreterValue(); + /** + * + * + *
+     * The script interpreter to use to run the script. If no interpreter is
+     * specified the script will be executed directly, which will likely
+     * only succeed for scripts with [shebang lines]
+     * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + * + * @return The interpreter. + */ + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter getInterpreter(); + + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.ExecutableCase getExecutableCase(); + } + /** + * + * + *
+   * Common configurations for an ExecStep.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ExecStepConfig} + */ + public static final class ExecStepConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.ExecStepConfig) + ExecStepConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecStepConfig.newBuilder() to construct. + private ExecStepConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecStepConfig() { + allowedSuccessCodes_ = emptyIntList(); + interpreter_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecStepConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExecStepConfig( + 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(); + executableCase_ = 1; + executable_ = s; + break; + } + case 18: + { + com.google.cloud.osconfig.v1.PatchJobs.GcsObject.Builder subBuilder = null; + if (executableCase_ == 2) { + subBuilder = + ((com.google.cloud.osconfig.v1.PatchJobs.GcsObject) executable_).toBuilder(); + } + executable_ = + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.GcsObject.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1.PatchJobs.GcsObject) executable_); + executable_ = subBuilder.buildPartial(); + } + executableCase_ = 2; + break; + } + case 24: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allowedSuccessCodes_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + allowedSuccessCodes_.addInt(input.readInt32()); + break; + } + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + allowedSuccessCodes_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + allowedSuccessCodes_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + interpreter_ = 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + allowedSuccessCodes_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecStepConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecStepConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.class, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder.class); + } + + /** + * + * + *
+     * The interpreter used to execute the a file.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1.ExecStepConfig.Interpreter} + */ + public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Invalid for a Windows ExecStepConfig. For a Linux ExecStepConfig, the
+       * interpreter will be parsed from the shebang line of the script if
+       * unspecified.
+       * 
+ * + * INTERPRETER_UNSPECIFIED = 0; + */ + INTERPRETER_UNSPECIFIED(0), + /** + * + * + *
+       * Indicates that the script is run with `/bin/sh` on Linux and `cmd`
+       * on Windows.
+       * 
+ * + * SHELL = 1; + */ + SHELL(1), + /** + * + * + *
+       * Indicates that the file is run with PowerShell flags
+       * `-NonInteractive`, `-NoProfile`, and `-ExecutionPolicy Bypass`.
+       * 
+ * + * POWERSHELL = 2; + */ + POWERSHELL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Invalid for a Windows ExecStepConfig. For a Linux ExecStepConfig, the
+       * interpreter will be parsed from the shebang line of the script if
+       * unspecified.
+       * 
+ * + * INTERPRETER_UNSPECIFIED = 0; + */ + public static final int INTERPRETER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Indicates that the script is run with `/bin/sh` on Linux and `cmd`
+       * on Windows.
+       * 
+ * + * SHELL = 1; + */ + public static final int SHELL_VALUE = 1; + /** + * + * + *
+       * Indicates that the file is run with PowerShell flags
+       * `-NonInteractive`, `-NoProfile`, and `-ExecutionPolicy Bypass`.
+       * 
+ * + * POWERSHELL = 2; + */ + public static final int POWERSHELL_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 Interpreter 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 Interpreter forNumber(int value) { + switch (value) { + case 0: + return INTERPRETER_UNSPECIFIED; + case 1: + return SHELL; + case 2: + return POWERSHELL; + 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 Interpreter findValueByNumber(int number) { + return Interpreter.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.osconfig.v1.PatchJobs.ExecStepConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Interpreter[] VALUES = values(); + + public static Interpreter 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 Interpreter(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1.ExecStepConfig.Interpreter) + } + + private int executableCase_ = 0; + private java.lang.Object executable_; + + public enum ExecutableCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LOCAL_PATH(1), + GCS_OBJECT(2), + EXECUTABLE_NOT_SET(0); + private final int value; + + private ExecutableCase(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 ExecutableCase valueOf(int value) { + return forNumber(value); + } + + public static ExecutableCase forNumber(int value) { + switch (value) { + case 1: + return LOCAL_PATH; + case 2: + return GCS_OBJECT; + case 0: + return EXECUTABLE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ExecutableCase getExecutableCase() { + return ExecutableCase.forNumber(executableCase_); + } + + public static final int LOCAL_PATH_FIELD_NUMBER = 1; + /** + * + * + *
+     * An absolute path to the executable on the VM.
+     * 
+ * + * string local_path = 1; + * + * @return The localPath. + */ + public java.lang.String getLocalPath() { + java.lang.Object ref = ""; + if (executableCase_ == 1) { + ref = executable_; + } + if (ref instanceof java.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 (executableCase_ == 1) { + executable_ = s; + } + return s; + } + } + /** + * + * + *
+     * An absolute path to the executable on the VM.
+     * 
+ * + * string local_path = 1; + * + * @return The bytes for localPath. + */ + public com.google.protobuf.ByteString getLocalPathBytes() { + java.lang.Object ref = ""; + if (executableCase_ == 1) { + ref = executable_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (executableCase_ == 1) { + executable_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_OBJECT_FIELD_NUMBER = 2; + /** + * + * + *
+     * A Google Cloud Storage object containing the executable.
+     * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + * + * @return Whether the gcsObject field is set. + */ + public boolean hasGcsObject() { + return executableCase_ == 2; + } + /** + * + * + *
+     * A Google Cloud Storage object containing the executable.
+     * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + * + * @return The gcsObject. + */ + public com.google.cloud.osconfig.v1.PatchJobs.GcsObject getGcsObject() { + if (executableCase_ == 2) { + return (com.google.cloud.osconfig.v1.PatchJobs.GcsObject) executable_; + } + return com.google.cloud.osconfig.v1.PatchJobs.GcsObject.getDefaultInstance(); + } + /** + * + * + *
+     * A Google Cloud Storage object containing the executable.
+     * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + */ + public com.google.cloud.osconfig.v1.PatchJobs.GcsObjectOrBuilder getGcsObjectOrBuilder() { + if (executableCase_ == 2) { + return (com.google.cloud.osconfig.v1.PatchJobs.GcsObject) executable_; + } + return com.google.cloud.osconfig.v1.PatchJobs.GcsObject.getDefaultInstance(); + } + + public static final int ALLOWED_SUCCESS_CODES_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.IntList allowedSuccessCodes_; + /** + * + * + *
+     * Defaults to [0]. A list of possible return values that the
+     * execution can return to indicate a success.
+     * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @return A list containing the allowedSuccessCodes. + */ + public java.util.List getAllowedSuccessCodesList() { + return allowedSuccessCodes_; + } + /** + * + * + *
+     * Defaults to [0]. A list of possible return values that the
+     * execution can return to indicate a success.
+     * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @return The count of allowedSuccessCodes. + */ + public int getAllowedSuccessCodesCount() { + return allowedSuccessCodes_.size(); + } + /** + * + * + *
+     * Defaults to [0]. A list of possible return values that the
+     * execution can return to indicate a success.
+     * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @param index The index of the element to return. + * @return The allowedSuccessCodes at the given index. + */ + public int getAllowedSuccessCodes(int index) { + return allowedSuccessCodes_.getInt(index); + } + + private int allowedSuccessCodesMemoizedSerializedSize = -1; + + public static final int INTERPRETER_FIELD_NUMBER = 4; + private int interpreter_; + /** + * + * + *
+     * The script interpreter to use to run the script. If no interpreter is
+     * specified the script will be executed directly, which will likely
+     * only succeed for scripts with [shebang lines]
+     * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + * + * @return The enum numeric value on the wire for interpreter. + */ + public int getInterpreterValue() { + return interpreter_; + } + /** + * + * + *
+     * The script interpreter to use to run the script. If no interpreter is
+     * specified the script will be executed directly, which will likely
+     * only succeed for scripts with [shebang lines]
+     * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+     * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + * + * @return The interpreter. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter getInterpreter() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter result = + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter.valueOf(interpreter_); + return result == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter.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 { + getSerializedSize(); + if (executableCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, executable_); + } + if (executableCase_ == 2) { + output.writeMessage(2, (com.google.cloud.osconfig.v1.PatchJobs.GcsObject) executable_); + } + if (getAllowedSuccessCodesList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(allowedSuccessCodesMemoizedSerializedSize); + } + for (int i = 0; i < allowedSuccessCodes_.size(); i++) { + output.writeInt32NoTag(allowedSuccessCodes_.getInt(i)); + } + if (interpreter_ + != com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter + .INTERPRETER_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, interpreter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (executableCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, executable_); + } + if (executableCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.osconfig.v1.PatchJobs.GcsObject) executable_); + } + { + int dataSize = 0; + for (int i = 0; i < allowedSuccessCodes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag( + allowedSuccessCodes_.getInt(i)); + } + size += dataSize; + if (!getAllowedSuccessCodesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + allowedSuccessCodesMemoizedSerializedSize = dataSize; + } + if (interpreter_ + != com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter + .INTERPRETER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, interpreter_); + } + 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.osconfig.v1.PatchJobs.ExecStepConfig)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig other = + (com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig) obj; + + if (!getAllowedSuccessCodesList().equals(other.getAllowedSuccessCodesList())) return false; + if (interpreter_ != other.interpreter_) return false; + if (!getExecutableCase().equals(other.getExecutableCase())) return false; + switch (executableCase_) { + case 1: + if (!getLocalPath().equals(other.getLocalPath())) return false; + break; + case 2: + if (!getGcsObject().equals(other.getGcsObject())) 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 (getAllowedSuccessCodesCount() > 0) { + hash = (37 * hash) + ALLOWED_SUCCESS_CODES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedSuccessCodesList().hashCode(); + } + hash = (37 * hash) + INTERPRETER_FIELD_NUMBER; + hash = (53 * hash) + interpreter_; + switch (executableCase_) { + case 1: + hash = (37 * hash) + LOCAL_PATH_FIELD_NUMBER; + hash = (53 * hash) + getLocalPath().hashCode(); + break; + case 2: + hash = (37 * hash) + GCS_OBJECT_FIELD_NUMBER; + hash = (53 * hash) + getGcsObject().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig 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.osconfig.v1.PatchJobs.ExecStepConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig 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.osconfig.v1.PatchJobs.ExecStepConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig 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.osconfig.v1.PatchJobs.ExecStepConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig 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.osconfig.v1.PatchJobs.ExecStepConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig 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.osconfig.v1.PatchJobs.ExecStepConfig 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; + } + /** + * + * + *
+     * Common configurations for an ExecStep.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.ExecStepConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.ExecStepConfig) + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecStepConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecStepConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.class, + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.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(); + allowedSuccessCodes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + interpreter_ = 0; + + executableCase_ = 0; + executable_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_ExecStepConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig build() { + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig result = + new com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig(this); + int from_bitField0_ = bitField0_; + if (executableCase_ == 1) { + result.executable_ = executable_; + } + if (executableCase_ == 2) { + if (gcsObjectBuilder_ == null) { + result.executable_ = executable_; + } else { + result.executable_ = gcsObjectBuilder_.build(); + } + } + if (((bitField0_ & 0x00000001) != 0)) { + allowedSuccessCodes_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedSuccessCodes_ = allowedSuccessCodes_; + result.interpreter_ = interpreter_; + result.executableCase_ = executableCase_; + 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.osconfig.v1.PatchJobs.ExecStepConfig) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig other) { + if (other == com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.getDefaultInstance()) + return this; + if (!other.allowedSuccessCodes_.isEmpty()) { + if (allowedSuccessCodes_.isEmpty()) { + allowedSuccessCodes_ = other.allowedSuccessCodes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedSuccessCodesIsMutable(); + allowedSuccessCodes_.addAll(other.allowedSuccessCodes_); + } + onChanged(); + } + if (other.interpreter_ != 0) { + setInterpreterValue(other.getInterpreterValue()); + } + switch (other.getExecutableCase()) { + case LOCAL_PATH: + { + executableCase_ = 1; + executable_ = other.executable_; + onChanged(); + break; + } + case GCS_OBJECT: + { + mergeGcsObject(other.getGcsObject()); + break; + } + case EXECUTABLE_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.osconfig.v1.PatchJobs.ExecStepConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int executableCase_ = 0; + private java.lang.Object executable_; + + public ExecutableCase getExecutableCase() { + return ExecutableCase.forNumber(executableCase_); + } + + public Builder clearExecutable() { + executableCase_ = 0; + executable_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * An absolute path to the executable on the VM.
+       * 
+ * + * string local_path = 1; + * + * @return The localPath. + */ + public java.lang.String getLocalPath() { + java.lang.Object ref = ""; + if (executableCase_ == 1) { + ref = executable_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (executableCase_ == 1) { + executable_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * An absolute path to the executable on the VM.
+       * 
+ * + * string local_path = 1; + * + * @return The bytes for localPath. + */ + public com.google.protobuf.ByteString getLocalPathBytes() { + java.lang.Object ref = ""; + if (executableCase_ == 1) { + ref = executable_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (executableCase_ == 1) { + executable_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * An absolute path to the executable on the VM.
+       * 
+ * + * string local_path = 1; + * + * @param value The localPath to set. + * @return This builder for chaining. + */ + public Builder setLocalPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + executableCase_ = 1; + executable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * An absolute path to the executable on the VM.
+       * 
+ * + * string local_path = 1; + * + * @return This builder for chaining. + */ + public Builder clearLocalPath() { + if (executableCase_ == 1) { + executableCase_ = 0; + executable_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * An absolute path to the executable on the VM.
+       * 
+ * + * string local_path = 1; + * + * @param value The bytes for localPath to set. + * @return This builder for chaining. + */ + public Builder setLocalPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + executableCase_ = 1; + executable_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.GcsObject, + com.google.cloud.osconfig.v1.PatchJobs.GcsObject.Builder, + com.google.cloud.osconfig.v1.PatchJobs.GcsObjectOrBuilder> + gcsObjectBuilder_; + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + * + * @return Whether the gcsObject field is set. + */ + public boolean hasGcsObject() { + return executableCase_ == 2; + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + * + * @return The gcsObject. + */ + public com.google.cloud.osconfig.v1.PatchJobs.GcsObject getGcsObject() { + if (gcsObjectBuilder_ == null) { + if (executableCase_ == 2) { + return (com.google.cloud.osconfig.v1.PatchJobs.GcsObject) executable_; + } + return com.google.cloud.osconfig.v1.PatchJobs.GcsObject.getDefaultInstance(); + } else { + if (executableCase_ == 2) { + return gcsObjectBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1.PatchJobs.GcsObject.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + */ + public Builder setGcsObject(com.google.cloud.osconfig.v1.PatchJobs.GcsObject value) { + if (gcsObjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executable_ = value; + onChanged(); + } else { + gcsObjectBuilder_.setMessage(value); + } + executableCase_ = 2; + return this; + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + */ + public Builder setGcsObject( + com.google.cloud.osconfig.v1.PatchJobs.GcsObject.Builder builderForValue) { + if (gcsObjectBuilder_ == null) { + executable_ = builderForValue.build(); + onChanged(); + } else { + gcsObjectBuilder_.setMessage(builderForValue.build()); + } + executableCase_ = 2; + return this; + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + */ + public Builder mergeGcsObject(com.google.cloud.osconfig.v1.PatchJobs.GcsObject value) { + if (gcsObjectBuilder_ == null) { + if (executableCase_ == 2 + && executable_ + != com.google.cloud.osconfig.v1.PatchJobs.GcsObject.getDefaultInstance()) { + executable_ = + com.google.cloud.osconfig.v1.PatchJobs.GcsObject.newBuilder( + (com.google.cloud.osconfig.v1.PatchJobs.GcsObject) executable_) + .mergeFrom(value) + .buildPartial(); + } else { + executable_ = value; + } + onChanged(); + } else { + if (executableCase_ == 2) { + gcsObjectBuilder_.mergeFrom(value); + } + gcsObjectBuilder_.setMessage(value); + } + executableCase_ = 2; + return this; + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + */ + public Builder clearGcsObject() { + if (gcsObjectBuilder_ == null) { + if (executableCase_ == 2) { + executableCase_ = 0; + executable_ = null; + onChanged(); + } + } else { + if (executableCase_ == 2) { + executableCase_ = 0; + executable_ = null; + } + gcsObjectBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + */ + public com.google.cloud.osconfig.v1.PatchJobs.GcsObject.Builder getGcsObjectBuilder() { + return getGcsObjectFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + */ + public com.google.cloud.osconfig.v1.PatchJobs.GcsObjectOrBuilder getGcsObjectOrBuilder() { + if ((executableCase_ == 2) && (gcsObjectBuilder_ != null)) { + return gcsObjectBuilder_.getMessageOrBuilder(); + } else { + if (executableCase_ == 2) { + return (com.google.cloud.osconfig.v1.PatchJobs.GcsObject) executable_; + } + return com.google.cloud.osconfig.v1.PatchJobs.GcsObject.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.GcsObject, + com.google.cloud.osconfig.v1.PatchJobs.GcsObject.Builder, + com.google.cloud.osconfig.v1.PatchJobs.GcsObjectOrBuilder> + getGcsObjectFieldBuilder() { + if (gcsObjectBuilder_ == null) { + if (!(executableCase_ == 2)) { + executable_ = com.google.cloud.osconfig.v1.PatchJobs.GcsObject.getDefaultInstance(); + } + gcsObjectBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.GcsObject, + com.google.cloud.osconfig.v1.PatchJobs.GcsObject.Builder, + com.google.cloud.osconfig.v1.PatchJobs.GcsObjectOrBuilder>( + (com.google.cloud.osconfig.v1.PatchJobs.GcsObject) executable_, + getParentForChildren(), + isClean()); + executable_ = null; + } + executableCase_ = 2; + onChanged(); + ; + return gcsObjectBuilder_; + } + + private com.google.protobuf.Internal.IntList allowedSuccessCodes_ = emptyIntList(); + + private void ensureAllowedSuccessCodesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedSuccessCodes_ = mutableCopy(allowedSuccessCodes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Defaults to [0]. A list of possible return values that the
+       * execution can return to indicate a success.
+       * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @return A list containing the allowedSuccessCodes. + */ + public java.util.List getAllowedSuccessCodesList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(allowedSuccessCodes_) + : allowedSuccessCodes_; + } + /** + * + * + *
+       * Defaults to [0]. A list of possible return values that the
+       * execution can return to indicate a success.
+       * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @return The count of allowedSuccessCodes. + */ + public int getAllowedSuccessCodesCount() { + return allowedSuccessCodes_.size(); + } + /** + * + * + *
+       * Defaults to [0]. A list of possible return values that the
+       * execution can return to indicate a success.
+       * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @param index The index of the element to return. + * @return The allowedSuccessCodes at the given index. + */ + public int getAllowedSuccessCodes(int index) { + return allowedSuccessCodes_.getInt(index); + } + /** + * + * + *
+       * Defaults to [0]. A list of possible return values that the
+       * execution can return to indicate a success.
+       * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @param index The index to set the value at. + * @param value The allowedSuccessCodes to set. + * @return This builder for chaining. + */ + public Builder setAllowedSuccessCodes(int index, int value) { + ensureAllowedSuccessCodesIsMutable(); + allowedSuccessCodes_.setInt(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Defaults to [0]. A list of possible return values that the
+       * execution can return to indicate a success.
+       * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @param value The allowedSuccessCodes to add. + * @return This builder for chaining. + */ + public Builder addAllowedSuccessCodes(int value) { + ensureAllowedSuccessCodesIsMutable(); + allowedSuccessCodes_.addInt(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Defaults to [0]. A list of possible return values that the
+       * execution can return to indicate a success.
+       * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @param values The allowedSuccessCodes to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedSuccessCodes( + java.lang.Iterable values) { + ensureAllowedSuccessCodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedSuccessCodes_); + onChanged(); + return this; + } + /** + * + * + *
+       * Defaults to [0]. A list of possible return values that the
+       * execution can return to indicate a success.
+       * 
+ * + * repeated int32 allowed_success_codes = 3; + * + * @return This builder for chaining. + */ + public Builder clearAllowedSuccessCodes() { + allowedSuccessCodes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private int interpreter_ = 0; + /** + * + * + *
+       * The script interpreter to use to run the script. If no interpreter is
+       * specified the script will be executed directly, which will likely
+       * only succeed for scripts with [shebang lines]
+       * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + * + * @return The enum numeric value on the wire for interpreter. + */ + public int getInterpreterValue() { + return interpreter_; + } + /** + * + * + *
+       * The script interpreter to use to run the script. If no interpreter is
+       * specified the script will be executed directly, which will likely
+       * only succeed for scripts with [shebang lines]
+       * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + * + * @param value The enum numeric value on the wire for interpreter to set. + * @return This builder for chaining. + */ + public Builder setInterpreterValue(int value) { + interpreter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The script interpreter to use to run the script. If no interpreter is
+       * specified the script will be executed directly, which will likely
+       * only succeed for scripts with [shebang lines]
+       * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + * + * @return The interpreter. + */ + public com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter getInterpreter() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter result = + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter.valueOf(interpreter_); + return result == null + ? com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The script interpreter to use to run the script. If no interpreter is
+       * specified the script will be executed directly, which will likely
+       * only succeed for scripts with [shebang lines]
+       * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + * + * @param value The interpreter to set. + * @return This builder for chaining. + */ + public Builder setInterpreter( + com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig.Interpreter value) { + if (value == null) { + throw new NullPointerException(); + } + + interpreter_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The script interpreter to use to run the script. If no interpreter is
+       * specified the script will be executed directly, which will likely
+       * only succeed for scripts with [shebang lines]
+       * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+       * 
+ * + * .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + * + * @return This builder for chaining. + */ + public Builder clearInterpreter() { + + interpreter_ = 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.osconfig.v1.ExecStepConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.ExecStepConfig) + private static final com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.ExecStepConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecStepConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecStepConfig(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.osconfig.v1.PatchJobs.ExecStepConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GcsObjectOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.GcsObject) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Bucket of the Google Cloud Storage object.
+     * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucket. + */ + java.lang.String getBucket(); + /** + * + * + *
+     * Required. Bucket of the Google Cloud Storage object.
+     * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucket. + */ + com.google.protobuf.ByteString getBucketBytes(); + + /** + * + * + *
+     * Required. Name of the Google Cloud Storage object.
+     * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The object. + */ + java.lang.String getObject(); + /** + * + * + *
+     * Required. Name of the Google Cloud Storage object.
+     * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for object. + */ + com.google.protobuf.ByteString getObjectBytes(); + + /** + * + * + *
+     * Required. Generation number of the Google Cloud Storage object. This is used to
+     * ensure that the ExecStep specified by this PatchJob does not change.
+     * 
+ * + * int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The generationNumber. + */ + long getGenerationNumber(); + } + /** + * + * + *
+   * Google Cloud Storage object representation.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.GcsObject} + */ + public static final class GcsObject extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.GcsObject) + GcsObjectOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsObject.newBuilder() to construct. + private GcsObject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsObject() { + bucket_ = ""; + object_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GcsObject(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsObject( + 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(); + + bucket_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + object_ = s; + break; + } + case 24: + { + generationNumber_ = input.readInt64(); + 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GcsObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GcsObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.GcsObject.class, + com.google.cloud.osconfig.v1.PatchJobs.GcsObject.Builder.class); + } + + public static final int BUCKET_FIELD_NUMBER = 1; + private volatile java.lang.Object bucket_; + /** + * + * + *
+     * Required. Bucket of the Google Cloud Storage object.
+     * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucket. + */ + public java.lang.String getBucket() { + java.lang.Object ref = bucket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucket_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Bucket of the Google Cloud Storage object.
+     * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucket. + */ + public com.google.protobuf.ByteString getBucketBytes() { + java.lang.Object ref = bucket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OBJECT_FIELD_NUMBER = 2; + private volatile java.lang.Object object_; + /** + * + * + *
+     * Required. Name of the Google Cloud Storage object.
+     * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The object. + */ + public java.lang.String getObject() { + java.lang.Object ref = object_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + object_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Name of the Google Cloud Storage object.
+     * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for object. + */ + public com.google.protobuf.ByteString getObjectBytes() { + java.lang.Object ref = object_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + object_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENERATION_NUMBER_FIELD_NUMBER = 3; + private long generationNumber_; + /** + * + * + *
+     * Required. Generation number of the Google Cloud Storage object. This is used to
+     * ensure that the ExecStep specified by this PatchJob does not change.
+     * 
+ * + * int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The generationNumber. + */ + public long getGenerationNumber() { + return generationNumber_; + } + + 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 (!getBucketBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bucket_); + } + if (!getObjectBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, object_); + } + if (generationNumber_ != 0L) { + output.writeInt64(3, generationNumber_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getBucketBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bucket_); + } + if (!getObjectBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, object_); + } + if (generationNumber_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, generationNumber_); + } + 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.osconfig.v1.PatchJobs.GcsObject)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.GcsObject other = + (com.google.cloud.osconfig.v1.PatchJobs.GcsObject) obj; + + if (!getBucket().equals(other.getBucket())) return false; + if (!getObject().equals(other.getObject())) return false; + if (getGenerationNumber() != other.getGenerationNumber()) 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) + BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getBucket().hashCode(); + hash = (37 * hash) + OBJECT_FIELD_NUMBER; + hash = (53 * hash) + getObject().hashCode(); + hash = (37 * hash) + GENERATION_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGenerationNumber()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GcsObject parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GcsObject 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.osconfig.v1.PatchJobs.GcsObject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GcsObject 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.osconfig.v1.PatchJobs.GcsObject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GcsObject parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GcsObject parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GcsObject 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.osconfig.v1.PatchJobs.GcsObject parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GcsObject 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.osconfig.v1.PatchJobs.GcsObject parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GcsObject 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.osconfig.v1.PatchJobs.GcsObject 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; + } + /** + * + * + *
+     * Google Cloud Storage object representation.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.GcsObject} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.GcsObject) + com.google.cloud.osconfig.v1.PatchJobs.GcsObjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GcsObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GcsObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.GcsObject.class, + com.google.cloud.osconfig.v1.PatchJobs.GcsObject.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.GcsObject.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(); + bucket_ = ""; + + object_ = ""; + + generationNumber_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_GcsObject_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.GcsObject getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.GcsObject.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.GcsObject build() { + com.google.cloud.osconfig.v1.PatchJobs.GcsObject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.GcsObject buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.GcsObject result = + new com.google.cloud.osconfig.v1.PatchJobs.GcsObject(this); + result.bucket_ = bucket_; + result.object_ = object_; + result.generationNumber_ = generationNumber_; + 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.osconfig.v1.PatchJobs.GcsObject) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.GcsObject) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.GcsObject other) { + if (other == com.google.cloud.osconfig.v1.PatchJobs.GcsObject.getDefaultInstance()) + return this; + if (!other.getBucket().isEmpty()) { + bucket_ = other.bucket_; + onChanged(); + } + if (!other.getObject().isEmpty()) { + object_ = other.object_; + onChanged(); + } + if (other.getGenerationNumber() != 0L) { + setGenerationNumber(other.getGenerationNumber()); + } + 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.osconfig.v1.PatchJobs.GcsObject parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.GcsObject) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object bucket_ = ""; + /** + * + * + *
+       * Required. Bucket of the Google Cloud Storage object.
+       * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucket. + */ + public java.lang.String getBucket() { + java.lang.Object ref = bucket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Bucket of the Google Cloud Storage object.
+       * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucket. + */ + public com.google.protobuf.ByteString getBucketBytes() { + java.lang.Object ref = bucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Bucket of the Google Cloud Storage object.
+       * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bucket to set. + * @return This builder for chaining. + */ + public Builder setBucket(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + bucket_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Bucket of the Google Cloud Storage object.
+       * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBucket() { + + bucket_ = getDefaultInstance().getBucket(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Bucket of the Google Cloud Storage object.
+       * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for bucket to set. + * @return This builder for chaining. + */ + public Builder setBucketBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + bucket_ = value; + onChanged(); + return this; + } + + private java.lang.Object object_ = ""; + /** + * + * + *
+       * Required. Name of the Google Cloud Storage object.
+       * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The object. + */ + public java.lang.String getObject() { + java.lang.Object ref = object_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + object_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Name of the Google Cloud Storage object.
+       * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for object. + */ + public com.google.protobuf.ByteString getObjectBytes() { + java.lang.Object ref = object_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + object_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Name of the Google Cloud Storage object.
+       * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The object to set. + * @return This builder for chaining. + */ + public Builder setObject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + object_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Name of the Google Cloud Storage object.
+       * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearObject() { + + object_ = getDefaultInstance().getObject(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Name of the Google Cloud Storage object.
+       * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for object to set. + * @return This builder for chaining. + */ + public Builder setObjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + object_ = value; + onChanged(); + return this; + } + + private long generationNumber_; + /** + * + * + *
+       * Required. Generation number of the Google Cloud Storage object. This is used to
+       * ensure that the ExecStep specified by this PatchJob does not change.
+       * 
+ * + * int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The generationNumber. + */ + public long getGenerationNumber() { + return generationNumber_; + } + /** + * + * + *
+       * Required. Generation number of the Google Cloud Storage object. This is used to
+       * ensure that the ExecStep specified by this PatchJob does not change.
+       * 
+ * + * int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The generationNumber to set. + * @return This builder for chaining. + */ + public Builder setGenerationNumber(long value) { + + generationNumber_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Generation number of the Google Cloud Storage object. This is used to
+       * ensure that the ExecStep specified by this PatchJob does not change.
+       * 
+ * + * int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGenerationNumber() { + + generationNumber_ = 0L; + 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.osconfig.v1.GcsObject) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.GcsObject) + private static final com.google.cloud.osconfig.v1.PatchJobs.GcsObject DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.GcsObject(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.GcsObject getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsObject parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsObject(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.osconfig.v1.PatchJobs.GcsObject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PatchInstanceFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.PatchInstanceFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Target all VM instances in the project. If true, no other criteria is
+     * permitted.
+     * 
+ * + * bool all = 1; + * + * @return The all. + */ + boolean getAll(); + + /** + * + * + *
+     * Targets VM instances matching at least one of these label sets. This allows
+     * targeting of disparate groups, for example "env=prod or env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + java.util.List + getGroupLabelsList(); + /** + * + * + *
+     * Targets VM instances matching at least one of these label sets. This allows
+     * targeting of disparate groups, for example "env=prod or env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel getGroupLabels(int index); + /** + * + * + *
+     * Targets VM instances matching at least one of these label sets. This allows
+     * targeting of disparate groups, for example "env=prod or env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + int getGroupLabelsCount(); + /** + * + * + *
+     * Targets VM instances matching at least one of these label sets. This allows
+     * targeting of disparate groups, for example "env=prod or env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder> + getGroupLabelsOrBuilderList(); + /** + * + * + *
+     * Targets VM instances matching at least one of these label sets. This allows
+     * targeting of disparate groups, for example "env=prod or env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder + getGroupLabelsOrBuilder(int index); + + /** + * + * + *
+     * Targets VM instances in ANY of these zones. Leave empty to target VM
+     * instances in any zone.
+     * 
+ * + * repeated string zones = 3; + * + * @return A list containing the zones. + */ + java.util.List getZonesList(); + /** + * + * + *
+     * Targets VM instances in ANY of these zones. Leave empty to target VM
+     * instances in any zone.
+     * 
+ * + * repeated string zones = 3; + * + * @return The count of zones. + */ + int getZonesCount(); + /** + * + * + *
+     * Targets VM instances in ANY of these zones. Leave empty to target VM
+     * instances in any zone.
+     * 
+ * + * repeated string zones = 3; + * + * @param index The index of the element to return. + * @return The zones at the given index. + */ + java.lang.String getZones(int index); + /** + * + * + *
+     * Targets VM instances in ANY of these zones. Leave empty to target VM
+     * instances in any zone.
+     * 
+ * + * repeated string zones = 3; + * + * @param index The index of the value to return. + * @return The bytes of the zones at the given index. + */ + com.google.protobuf.ByteString getZonesBytes(int index); + + /** + * + * + *
+     * Targets any of the VM instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+     * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+     * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+     * 
+ * + * repeated string instances = 4; + * + * @return A list containing the instances. + */ + java.util.List getInstancesList(); + /** + * + * + *
+     * Targets any of the VM instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+     * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+     * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+     * 
+ * + * repeated string instances = 4; + * + * @return The count of instances. + */ + int getInstancesCount(); + /** + * + * + *
+     * Targets any of the VM instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+     * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+     * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+     * 
+ * + * repeated string instances = 4; + * + * @param index The index of the element to return. + * @return The instances at the given index. + */ + java.lang.String getInstances(int index); + /** + * + * + *
+     * Targets any of the VM instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+     * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+     * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+     * 
+ * + * repeated string instances = 4; + * + * @param index The index of the value to return. + * @return The bytes of the instances at the given index. + */ + com.google.protobuf.ByteString getInstancesBytes(int index); + + /** + * + * + *
+     * Targets VMs whose name starts with one of these prefixes. Similar to
+     * labels, this is another way to group VMs when targeting configs, for
+     * example prefix="prod-".
+     * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @return A list containing the instanceNamePrefixes. + */ + java.util.List getInstanceNamePrefixesList(); + /** + * + * + *
+     * Targets VMs whose name starts with one of these prefixes. Similar to
+     * labels, this is another way to group VMs when targeting configs, for
+     * example prefix="prod-".
+     * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @return The count of instanceNamePrefixes. + */ + int getInstanceNamePrefixesCount(); + /** + * + * + *
+     * Targets VMs whose name starts with one of these prefixes. Similar to
+     * labels, this is another way to group VMs when targeting configs, for
+     * example prefix="prod-".
+     * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @param index The index of the element to return. + * @return The instanceNamePrefixes at the given index. + */ + java.lang.String getInstanceNamePrefixes(int index); + /** + * + * + *
+     * Targets VMs whose name starts with one of these prefixes. Similar to
+     * labels, this is another way to group VMs when targeting configs, for
+     * example prefix="prod-".
+     * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @param index The index of the value to return. + * @return The bytes of the instanceNamePrefixes at the given index. + */ + com.google.protobuf.ByteString getInstanceNamePrefixesBytes(int index); + } + /** + * + * + *
+   * A filter to target VM instances for patching. The targeted
+   * VMs must meet all criteria specified. So if both labels and zones are
+   * specified, the patch job targets only VMs with those labels and in those
+   * zones.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchInstanceFilter} + */ + public static final class PatchInstanceFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.PatchInstanceFilter) + PatchInstanceFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use PatchInstanceFilter.newBuilder() to construct. + private PatchInstanceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PatchInstanceFilter() { + groupLabels_ = java.util.Collections.emptyList(); + zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; + instances_ = com.google.protobuf.LazyStringArrayList.EMPTY; + instanceNamePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PatchInstanceFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PatchInstanceFilter( + 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: + { + all_ = input.readBool(); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + groupLabels_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel>(); + mutable_bitField0_ |= 0x00000001; + } + groupLabels_.add( + input.readMessage( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + .parser(), + extensionRegistry)); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + zones_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + zones_.add(s); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + instances_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + instances_.add(s); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + instanceNamePrefixes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + instanceNamePrefixes_.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)) { + groupLabels_ = java.util.Collections.unmodifiableList(groupLabels_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + zones_ = zones_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + instances_ = instances_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + instanceNamePrefixes_ = instanceNamePrefixes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder.class); + } + + public interface GroupLabelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for a VM
+       * instance to be targeted by this filter.
+       * 
+ * + * map<string, string> labels = 1; + */ + int getLabelsCount(); + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for a VM
+       * instance to be targeted by this filter.
+       * 
+ * + * map<string, string> labels = 1; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for a VM
+       * instance to be targeted by this filter.
+       * 
+ * + * map<string, string> labels = 1; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for a VM
+       * instance to be targeted by this filter.
+       * 
+ * + * map<string, string> labels = 1; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for a VM
+       * instance to be targeted by this filter.
+       * 
+ * + * map<string, string> labels = 1; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + } + /** + * + * + *
+     * Represents a group of VMs that can be identified as having all these
+     * labels, for example "env=prod and app=web".
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} + */ + public static final class GroupLabel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel) + GroupLabelOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupLabel.newBuilder() to construct. + private GroupLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GroupLabel() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GroupLabel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GroupLabel( + 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)) { + 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder + .class); + } + + public static final int LABELS_FIELD_NUMBER = 1; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_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(); + } + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for a VM
+       * instance to be targeted by this filter.
+       * 
+ * + * map<string, string> labels = 1; + */ + 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.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for a VM
+       * instance to be targeted by this filter.
+       * 
+ * + * map<string, string> labels = 1; + */ + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for a VM
+       * instance to be targeted by this filter.
+       * 
+ * + * map<string, string> labels = 1; + */ + 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; + } + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for a VM
+       * instance to be targeted by this filter.
+       * 
+ * + * map<string, string> labels = 1; + */ + 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 { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, 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.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel other = + (com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel) obj; + + 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(); + 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.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel 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.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel 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.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel 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.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + 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.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel 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.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Represents a group of VMs that can be identified as having all these
+       * labels, for example "env=prod and app=web".
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel) + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 1: + 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.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.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(); + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel build() { + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel result = + new com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel(this); + int from_bitField0_ = bitField0_; + 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.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel) { + return mergeFrom( + (com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel other) { + if (other + == com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + .getDefaultInstance()) return this; + 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.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + 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(); + } + /** + * + * + *
+         * Google Compute Engine instance labels that must be present for a VM
+         * instance to be targeted by this filter.
+         * 
+ * + * map<string, string> labels = 1; + */ + 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.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+         * Google Compute Engine instance labels that must be present for a VM
+         * instance to be targeted by this filter.
+         * 
+ * + * map<string, string> labels = 1; + */ + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+         * Google Compute Engine instance labels that must be present for a VM
+         * instance to be targeted by this filter.
+         * 
+ * + * map<string, string> labels = 1; + */ + 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; + } + /** + * + * + *
+         * Google Compute Engine instance labels that must be present for a VM
+         * instance to be targeted by this filter.
+         * 
+ * + * map<string, string> labels = 1; + */ + 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; + } + /** + * + * + *
+         * Google Compute Engine instance labels that must be present for a VM
+         * instance to be targeted by this filter.
+         * 
+ * + * map<string, string> labels = 1; + */ + 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(); + } + /** + * + * + *
+         * Google Compute Engine instance labels that must be present for a VM
+         * instance to be targeted by this filter.
+         * 
+ * + * map<string, string> labels = 1; + */ + 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; + } + /** + * + * + *
+         * Google Compute Engine instance labels that must be present for a VM
+         * instance to be targeted by this filter.
+         * 
+ * + * map<string, string> labels = 1; + */ + 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.osconfig.v1.PatchInstanceFilter.GroupLabel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel) + private static final com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupLabel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupLabel(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.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ALL_FIELD_NUMBER = 1; + private boolean all_; + /** + * + * + *
+     * Target all VM instances in the project. If true, no other criteria is
+     * permitted.
+     * 
+ * + * bool all = 1; + * + * @return The all. + */ + public boolean getAll() { + return all_; + } + + public static final int GROUP_LABELS_FIELD_NUMBER = 2; + private java.util.List + groupLabels_; + /** + * + * + *
+     * Targets VM instances matching at least one of these label sets. This allows
+     * targeting of disparate groups, for example "env=prod or env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public java.util.List + getGroupLabelsList() { + return groupLabels_; + } + /** + * + * + *
+     * Targets VM instances matching at least one of these label sets. This allows
+     * targeting of disparate groups, for example "env=prod or env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder> + getGroupLabelsOrBuilderList() { + return groupLabels_; + } + /** + * + * + *
+     * Targets VM instances matching at least one of these label sets. This allows
+     * targeting of disparate groups, for example "env=prod or env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public int getGroupLabelsCount() { + return groupLabels_.size(); + } + /** + * + * + *
+     * Targets VM instances matching at least one of these label sets. This allows
+     * targeting of disparate groups, for example "env=prod or env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel getGroupLabels( + int index) { + return groupLabels_.get(index); + } + /** + * + * + *
+     * Targets VM instances matching at least one of these label sets. This allows
+     * targeting of disparate groups, for example "env=prod or env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder + getGroupLabelsOrBuilder(int index) { + return groupLabels_.get(index); + } + + public static final int ZONES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList zones_; + /** + * + * + *
+     * Targets VM instances in ANY of these zones. Leave empty to target VM
+     * instances in any zone.
+     * 
+ * + * repeated string zones = 3; + * + * @return A list containing the zones. + */ + public com.google.protobuf.ProtocolStringList getZonesList() { + return zones_; + } + /** + * + * + *
+     * Targets VM instances in ANY of these zones. Leave empty to target VM
+     * instances in any zone.
+     * 
+ * + * repeated string zones = 3; + * + * @return The count of zones. + */ + public int getZonesCount() { + return zones_.size(); + } + /** + * + * + *
+     * Targets VM instances in ANY of these zones. Leave empty to target VM
+     * instances in any zone.
+     * 
+ * + * repeated string zones = 3; + * + * @param index The index of the element to return. + * @return The zones at the given index. + */ + public java.lang.String getZones(int index) { + return zones_.get(index); + } + /** + * + * + *
+     * Targets VM instances in ANY of these zones. Leave empty to target VM
+     * instances in any zone.
+     * 
+ * + * repeated string zones = 3; + * + * @param index The index of the value to return. + * @return The bytes of the zones at the given index. + */ + public com.google.protobuf.ByteString getZonesBytes(int index) { + return zones_.getByteString(index); + } + + public static final int INSTANCES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList instances_; + /** + * + * + *
+     * Targets any of the VM instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+     * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+     * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+     * 
+ * + * repeated string instances = 4; + * + * @return A list containing the instances. + */ + public com.google.protobuf.ProtocolStringList getInstancesList() { + return instances_; + } + /** + * + * + *
+     * Targets any of the VM instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+     * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+     * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+     * 
+ * + * repeated string instances = 4; + * + * @return The count of instances. + */ + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+     * Targets any of the VM instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+     * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+     * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+     * 
+ * + * repeated string instances = 4; + * + * @param index The index of the element to return. + * @return The instances at the given index. + */ + public java.lang.String getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+     * Targets any of the VM instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+     * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+     * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+     * 
+ * + * repeated string instances = 4; + * + * @param index The index of the value to return. + * @return The bytes of the instances at the given index. + */ + public com.google.protobuf.ByteString getInstancesBytes(int index) { + return instances_.getByteString(index); + } + + public static final int INSTANCE_NAME_PREFIXES_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList instanceNamePrefixes_; + /** + * + * + *
+     * Targets VMs whose name starts with one of these prefixes. Similar to
+     * labels, this is another way to group VMs when targeting configs, for
+     * example prefix="prod-".
+     * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @return A list containing the instanceNamePrefixes. + */ + public com.google.protobuf.ProtocolStringList getInstanceNamePrefixesList() { + return instanceNamePrefixes_; + } + /** + * + * + *
+     * Targets VMs whose name starts with one of these prefixes. Similar to
+     * labels, this is another way to group VMs when targeting configs, for
+     * example prefix="prod-".
+     * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @return The count of instanceNamePrefixes. + */ + public int getInstanceNamePrefixesCount() { + return instanceNamePrefixes_.size(); + } + /** + * + * + *
+     * Targets VMs whose name starts with one of these prefixes. Similar to
+     * labels, this is another way to group VMs when targeting configs, for
+     * example prefix="prod-".
+     * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @param index The index of the element to return. + * @return The instanceNamePrefixes at the given index. + */ + public java.lang.String getInstanceNamePrefixes(int index) { + return instanceNamePrefixes_.get(index); + } + /** + * + * + *
+     * Targets VMs whose name starts with one of these prefixes. Similar to
+     * labels, this is another way to group VMs when targeting configs, for
+     * example prefix="prod-".
+     * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @param index The index of the value to return. + * @return The bytes of the instanceNamePrefixes at the given index. + */ + public com.google.protobuf.ByteString getInstanceNamePrefixesBytes(int index) { + return instanceNamePrefixes_.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 { + if (all_ != false) { + output.writeBool(1, all_); + } + for (int i = 0; i < groupLabels_.size(); i++) { + output.writeMessage(2, groupLabels_.get(i)); + } + for (int i = 0; i < zones_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, zones_.getRaw(i)); + } + for (int i = 0; i < instances_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, instances_.getRaw(i)); + } + for (int i = 0; i < instanceNamePrefixes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, instanceNamePrefixes_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (all_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, all_); + } + for (int i = 0; i < groupLabels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, groupLabels_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < zones_.size(); i++) { + dataSize += computeStringSizeNoTag(zones_.getRaw(i)); + } + size += dataSize; + size += 1 * getZonesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < instances_.size(); i++) { + dataSize += computeStringSizeNoTag(instances_.getRaw(i)); + } + size += dataSize; + size += 1 * getInstancesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < instanceNamePrefixes_.size(); i++) { + dataSize += computeStringSizeNoTag(instanceNamePrefixes_.getRaw(i)); + } + size += dataSize; + size += 1 * getInstanceNamePrefixesList().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.osconfig.v1.PatchJobs.PatchInstanceFilter)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter other = + (com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter) obj; + + if (getAll() != other.getAll()) return false; + if (!getGroupLabelsList().equals(other.getGroupLabelsList())) return false; + if (!getZonesList().equals(other.getZonesList())) return false; + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getInstanceNamePrefixesList().equals(other.getInstanceNamePrefixesList())) 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) + ALL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAll()); + if (getGroupLabelsCount() > 0) { + hash = (37 * hash) + GROUP_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getGroupLabelsList().hashCode(); + } + if (getZonesCount() > 0) { + hash = (37 * hash) + ZONES_FIELD_NUMBER; + hash = (53 * hash) + getZonesList().hashCode(); + } + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + if (getInstanceNamePrefixesCount() > 0) { + hash = (37 * hash) + INSTANCE_NAME_PREFIXES_FIELD_NUMBER; + hash = (53 * hash) + getInstanceNamePrefixesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter 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.osconfig.v1.PatchJobs.PatchInstanceFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter 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.osconfig.v1.PatchJobs.PatchInstanceFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter 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.osconfig.v1.PatchJobs.PatchInstanceFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter 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.osconfig.v1.PatchJobs.PatchInstanceFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter 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.osconfig.v1.PatchJobs.PatchInstanceFilter 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 filter to target VM instances for patching. The targeted
+     * VMs must meet all criteria specified. So if both labels and zones are
+     * specified, the patch job targets only VMs with those labels and in those
+     * zones.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1.PatchInstanceFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1.PatchInstanceFilter) + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.class, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGroupLabelsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + all_ = false; + + if (groupLabelsBuilder_ == null) { + groupLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + groupLabelsBuilder_.clear(); + } + zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + instances_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + instanceNamePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1.PatchJobs + .internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter build() { + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter buildPartial() { + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter result = + new com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter(this); + int from_bitField0_ = bitField0_; + result.all_ = all_; + if (groupLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + groupLabels_ = java.util.Collections.unmodifiableList(groupLabels_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupLabels_ = groupLabels_; + } else { + result.groupLabels_ = groupLabelsBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + zones_ = zones_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.zones_ = zones_; + if (((bitField0_ & 0x00000004) != 0)) { + instances_ = instances_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.instances_ = instances_; + if (((bitField0_ & 0x00000008) != 0)) { + instanceNamePrefixes_ = instanceNamePrefixes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.instanceNamePrefixes_ = instanceNamePrefixes_; + 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.osconfig.v1.PatchJobs.PatchInstanceFilter) { + return mergeFrom((com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter other) { + if (other + == com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.getDefaultInstance()) + return this; + if (other.getAll() != false) { + setAll(other.getAll()); + } + if (groupLabelsBuilder_ == null) { + if (!other.groupLabels_.isEmpty()) { + if (groupLabels_.isEmpty()) { + groupLabels_ = other.groupLabels_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupLabelsIsMutable(); + groupLabels_.addAll(other.groupLabels_); + } + onChanged(); + } + } else { + if (!other.groupLabels_.isEmpty()) { + if (groupLabelsBuilder_.isEmpty()) { + groupLabelsBuilder_.dispose(); + groupLabelsBuilder_ = null; + groupLabels_ = other.groupLabels_; + bitField0_ = (bitField0_ & ~0x00000001); + groupLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGroupLabelsFieldBuilder() + : null; + } else { + groupLabelsBuilder_.addAllMessages(other.groupLabels_); + } + } + } + if (!other.zones_.isEmpty()) { + if (zones_.isEmpty()) { + zones_ = other.zones_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureZonesIsMutable(); + zones_.addAll(other.zones_); + } + onChanged(); + } + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + if (!other.instanceNamePrefixes_.isEmpty()) { + if (instanceNamePrefixes_.isEmpty()) { + instanceNamePrefixes_ = other.instanceNamePrefixes_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureInstanceNamePrefixesIsMutable(); + instanceNamePrefixes_.addAll(other.instanceNamePrefixes_); + } + 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.osconfig.v1.PatchJobs.PatchInstanceFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private boolean all_; + /** + * + * + *
+       * Target all VM instances in the project. If true, no other criteria is
+       * permitted.
+       * 
+ * + * bool all = 1; + * + * @return The all. + */ + public boolean getAll() { + return all_; + } + /** + * + * + *
+       * Target all VM instances in the project. If true, no other criteria is
+       * permitted.
+       * 
+ * + * bool all = 1; + * + * @param value The all to set. + * @return This builder for chaining. + */ + public Builder setAll(boolean value) { + + all_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Target all VM instances in the project. If true, no other criteria is
+       * permitted.
+       * 
+ * + * bool all = 1; + * + * @return This builder for chaining. + */ + public Builder clearAll() { + + all_ = false; + onChanged(); + return this; + } + + private java.util.List + groupLabels_ = java.util.Collections.emptyList(); + + private void ensureGroupLabelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + groupLabels_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel>( + groupLabels_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder> + groupLabelsBuilder_; + + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public java.util.List + getGroupLabelsList() { + if (groupLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupLabels_); + } else { + return groupLabelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public int getGroupLabelsCount() { + if (groupLabelsBuilder_ == null) { + return groupLabels_.size(); + } else { + return groupLabelsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel getGroupLabels( + int index) { + if (groupLabelsBuilder_ == null) { + return groupLabels_.get(index); + } else { + return groupLabelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder setGroupLabels( + int index, com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel value) { + if (groupLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupLabelsIsMutable(); + groupLabels_.set(index, value); + onChanged(); + } else { + groupLabelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder setGroupLabels( + int index, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder + builderForValue) { + if (groupLabelsBuilder_ == null) { + ensureGroupLabelsIsMutable(); + groupLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + groupLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder addGroupLabels( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel value) { + if (groupLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupLabelsIsMutable(); + groupLabels_.add(value); + onChanged(); + } else { + groupLabelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder addGroupLabels( + int index, com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel value) { + if (groupLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupLabelsIsMutable(); + groupLabels_.add(index, value); + onChanged(); + } else { + groupLabelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder addGroupLabels( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder + builderForValue) { + if (groupLabelsBuilder_ == null) { + ensureGroupLabelsIsMutable(); + groupLabels_.add(builderForValue.build()); + onChanged(); + } else { + groupLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder addGroupLabels( + int index, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder + builderForValue) { + if (groupLabelsBuilder_ == null) { + ensureGroupLabelsIsMutable(); + groupLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + groupLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder addAllGroupLabels( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel> + values) { + if (groupLabelsBuilder_ == null) { + ensureGroupLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groupLabels_); + onChanged(); + } else { + groupLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder clearGroupLabels() { + if (groupLabelsBuilder_ == null) { + groupLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupLabelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder removeGroupLabels(int index) { + if (groupLabelsBuilder_ == null) { + ensureGroupLabelsIsMutable(); + groupLabels_.remove(index); + onChanged(); + } else { + groupLabelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder + getGroupLabelsBuilder(int index) { + return getGroupLabelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder + getGroupLabelsOrBuilder(int index) { + if (groupLabelsBuilder_ == null) { + return groupLabels_.get(index); + } else { + return groupLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder> + getGroupLabelsOrBuilderList() { + if (groupLabelsBuilder_ != null) { + return groupLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupLabels_); + } + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder + addGroupLabelsBuilder() { + return getGroupLabelsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + .getDefaultInstance()); + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder + addGroupLabelsBuilder(int index) { + return getGroupLabelsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel + .getDefaultInstance()); + } + /** + * + * + *
+       * Targets VM instances matching at least one of these label sets. This allows
+       * targeting of disparate groups, for example "env=prod or env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder> + getGroupLabelsBuilderList() { + return getGroupLabelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder> + getGroupLabelsFieldBuilder() { + if (groupLabelsBuilder_ == null) { + groupLabelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabel.Builder, + com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder>( + groupLabels_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + groupLabels_ = null; + } + return groupLabelsBuilder_; + } + + private com.google.protobuf.LazyStringList zones_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureZonesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + zones_ = new com.google.protobuf.LazyStringArrayList(zones_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * Targets VM instances in ANY of these zones. Leave empty to target VM
+       * instances in any zone.
+       * 
+ * + * repeated string zones = 3; + * + * @return A list containing the zones. + */ + public com.google.protobuf.ProtocolStringList getZonesList() { + return zones_.getUnmodifiableView(); + } + /** + * + * + *
+       * Targets VM instances in ANY of these zones. Leave empty to target VM
+       * instances in any zone.
+       * 
+ * + * repeated string zones = 3; + * + * @return The count of zones. + */ + public int getZonesCount() { + return zones_.size(); + } + /** + * + * + *
+       * Targets VM instances in ANY of these zones. Leave empty to target VM
+       * instances in any zone.
+       * 
+ * + * repeated string zones = 3; + * + * @param index The index of the element to return. + * @return The zones at the given index. + */ + public java.lang.String getZones(int index) { + return zones_.get(index); + } + /** + * + * + *
+       * Targets VM instances in ANY of these zones. Leave empty to target VM
+       * instances in any zone.
+       * 
+ * + * repeated string zones = 3; + * + * @param index The index of the value to return. + * @return The bytes of the zones at the given index. + */ + public com.google.protobuf.ByteString getZonesBytes(int index) { + return zones_.getByteString(index); + } + /** + * + * + *
+       * Targets VM instances in ANY of these zones. Leave empty to target VM
+       * instances in any zone.
+       * 
+ * + * repeated string zones = 3; + * + * @param index The index to set the value at. + * @param value The zones to set. + * @return This builder for chaining. + */ + public Builder setZones(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets VM instances in ANY of these zones. Leave empty to target VM
+       * instances in any zone.
+       * 
+ * + * repeated string zones = 3; + * + * @param value The zones to add. + * @return This builder for chaining. + */ + public Builder addZones(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets VM instances in ANY of these zones. Leave empty to target VM
+       * instances in any zone.
+       * 
+ * + * repeated string zones = 3; + * + * @param values The zones to add. + * @return This builder for chaining. + */ + public Builder addAllZones(java.lang.Iterable values) { + ensureZonesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, zones_); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets VM instances in ANY of these zones. Leave empty to target VM
+       * instances in any zone.
+       * 
+ * + * repeated string zones = 3; + * + * @return This builder for chaining. + */ + public Builder clearZones() { + zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets VM instances in ANY of these zones. Leave empty to target VM
+       * instances in any zone.
+       * 
+ * + * repeated string zones = 3; + * + * @param value The bytes of the zones to add. + * @return This builder for chaining. + */ + public Builder addZonesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureZonesIsMutable(); + zones_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList instances_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + instances_ = new com.google.protobuf.LazyStringArrayList(instances_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+       * Targets any of the VM instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+       * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+       * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+       * 
+ * + * repeated string instances = 4; + * + * @return A list containing the instances. + */ + public com.google.protobuf.ProtocolStringList getInstancesList() { + return instances_.getUnmodifiableView(); + } + /** + * + * + *
+       * Targets any of the VM instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+       * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+       * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+       * 
+ * + * repeated string instances = 4; + * + * @return The count of instances. + */ + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+       * Targets any of the VM instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+       * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+       * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+       * 
+ * + * repeated string instances = 4; + * + * @param index The index of the element to return. + * @return The instances at the given index. + */ + public java.lang.String getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+       * Targets any of the VM instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+       * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+       * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+       * 
+ * + * repeated string instances = 4; + * + * @param index The index of the value to return. + * @return The bytes of the instances at the given index. + */ + public com.google.protobuf.ByteString getInstancesBytes(int index) { + return instances_.getByteString(index); + } + /** + * + * + *
+       * Targets any of the VM instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+       * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+       * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+       * 
+ * + * repeated string instances = 4; + * + * @param index The index to set the value at. + * @param value The instances to set. + * @return This builder for chaining. + */ + public Builder setInstances(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets any of the VM instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+       * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+       * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+       * 
+ * + * repeated string instances = 4; + * + * @param value The instances to add. + * @return This builder for chaining. + */ + public Builder addInstances(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets any of the VM instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+       * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+       * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+       * 
+ * + * repeated string instances = 4; + * + * @param values The instances to add. + * @return This builder for chaining. + */ + public Builder addAllInstances(java.lang.Iterable values) { + ensureInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets any of the VM instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+       * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+       * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+       * 
+ * + * repeated string instances = 4; + * + * @return This builder for chaining. + */ + public Builder clearInstances() { + instances_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets any of the VM instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
+       * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
+       * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
+       * 
+ * + * repeated string instances = 4; + * + * @param value The bytes of the instances to add. + * @return This builder for chaining. + */ + public Builder addInstancesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList instanceNamePrefixes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInstanceNamePrefixesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + instanceNamePrefixes_ = + new com.google.protobuf.LazyStringArrayList(instanceNamePrefixes_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+       * Targets VMs whose name starts with one of these prefixes. Similar to
+       * labels, this is another way to group VMs when targeting configs, for
+       * example prefix="prod-".
+       * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @return A list containing the instanceNamePrefixes. + */ + public com.google.protobuf.ProtocolStringList getInstanceNamePrefixesList() { + return instanceNamePrefixes_.getUnmodifiableView(); + } + /** + * + * + *
+       * Targets VMs whose name starts with one of these prefixes. Similar to
+       * labels, this is another way to group VMs when targeting configs, for
+       * example prefix="prod-".
+       * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @return The count of instanceNamePrefixes. + */ + public int getInstanceNamePrefixesCount() { + return instanceNamePrefixes_.size(); + } + /** + * + * + *
+       * Targets VMs whose name starts with one of these prefixes. Similar to
+       * labels, this is another way to group VMs when targeting configs, for
+       * example prefix="prod-".
+       * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @param index The index of the element to return. + * @return The instanceNamePrefixes at the given index. + */ + public java.lang.String getInstanceNamePrefixes(int index) { + return instanceNamePrefixes_.get(index); + } + /** + * + * + *
+       * Targets VMs whose name starts with one of these prefixes. Similar to
+       * labels, this is another way to group VMs when targeting configs, for
+       * example prefix="prod-".
+       * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @param index The index of the value to return. + * @return The bytes of the instanceNamePrefixes at the given index. + */ + public com.google.protobuf.ByteString getInstanceNamePrefixesBytes(int index) { + return instanceNamePrefixes_.getByteString(index); + } + /** + * + * + *
+       * Targets VMs whose name starts with one of these prefixes. Similar to
+       * labels, this is another way to group VMs when targeting configs, for
+       * example prefix="prod-".
+       * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @param index The index to set the value at. + * @param value The instanceNamePrefixes to set. + * @return This builder for chaining. + */ + public Builder setInstanceNamePrefixes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceNamePrefixesIsMutable(); + instanceNamePrefixes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets VMs whose name starts with one of these prefixes. Similar to
+       * labels, this is another way to group VMs when targeting configs, for
+       * example prefix="prod-".
+       * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @param value The instanceNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addInstanceNamePrefixes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceNamePrefixesIsMutable(); + instanceNamePrefixes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets VMs whose name starts with one of these prefixes. Similar to
+       * labels, this is another way to group VMs when targeting configs, for
+       * example prefix="prod-".
+       * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @param values The instanceNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addAllInstanceNamePrefixes(java.lang.Iterable values) { + ensureInstanceNamePrefixesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instanceNamePrefixes_); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets VMs whose name starts with one of these prefixes. Similar to
+       * labels, this is another way to group VMs when targeting configs, for
+       * example prefix="prod-".
+       * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @return This builder for chaining. + */ + public Builder clearInstanceNamePrefixes() { + instanceNamePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets VMs whose name starts with one of these prefixes. Similar to
+       * labels, this is another way to group VMs when targeting configs, for
+       * example prefix="prod-".
+       * 
+ * + * repeated string instance_name_prefixes = 5; + * + * @param value The bytes of the instanceNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addInstanceNamePrefixesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInstanceNamePrefixesIsMutable(); + instanceNamePrefixes_.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.osconfig.v1.PatchInstanceFilter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1.PatchInstanceFilter) + private static final com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter(); + } + + public static com.google.cloud.osconfig.v1.PatchJobs.PatchInstanceFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PatchInstanceFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PatchInstanceFilter(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.osconfig.v1.PatchJobs.PatchInstanceFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_ExecutePatchJobRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_ExecutePatchJobRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_GetPatchJobRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_GetPatchJobRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_PatchJobInstanceDetails_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_PatchJobInstanceDetails_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_ListPatchJobsRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_ListPatchJobsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_ListPatchJobsResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_ListPatchJobsResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_PatchJob_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_PatchJob_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_PatchJob_InstanceDetailsSummary_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_PatchJob_InstanceDetailsSummary_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_PatchConfig_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_PatchConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_Instance_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_Instance_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_CancelPatchJobRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_CancelPatchJobRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_AptSettings_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_AptSettings_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_YumSettings_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_YumSettings_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_GooSettings_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_GooSettings_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_ZypperSettings_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_ZypperSettings_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_WindowsUpdateSettings_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_WindowsUpdateSettings_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_ExecStep_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_ExecStep_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_ExecStepConfig_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_ExecStepConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_GcsObject_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_GcsObject_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_LabelsEntry_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/osconfig/v1/patch_jobs.pr" + + "oto\022\030google.cloud.osconfig.v1\032\037google/ap" + + "i/field_behavior.proto\032\031google/api/resou" + + "rce.proto\032\036google/protobuf/duration.prot" + + "o\032\037google/protobuf/timestamp.proto\"\320\002\n\026E" + + "xecutePatchJobRequest\022C\n\006parent\030\001 \001(\tB3\340" + + "A\002\372A-\n+cloudresourcemanager.googleapis.c" + + "om/Project\022\023\n\013description\030\002 \001(\t\022K\n\017insta" + + "nce_filter\030\007 \001(\0132-.google.cloud.osconfig" + + ".v1.PatchInstanceFilterB\003\340A\002\022;\n\014patch_co" + + "nfig\030\004 \001(\0132%.google.cloud.osconfig.v1.Pa" + + "tchConfig\022+\n\010duration\030\005 \001(\0132\031.google.pro" + + "tobuf.Duration\022\017\n\007dry_run\030\006 \001(\010\022\024\n\014displ" + + "ay_name\030\010 \001(\t\"L\n\022GetPatchJobRequest\0226\n\004n" + + "ame\030\001 \001(\tB(\340A\002\372A\"\n osconfig.googleapis.c" + + "om/PatchJob\"\225\001\n\"ListPatchJobInstanceDeta" + + "ilsRequest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\n osco" + + "nfig.googleapis.com/PatchJob\022\021\n\tpage_siz" + + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 " + + "\001(\t\"\225\001\n#ListPatchJobInstanceDetailsRespo" + + "nse\022U\n\032patch_job_instance_details\030\001 \003(\0132" + + "1.google.cloud.osconfig.v1.PatchJobInsta" + + "nceDetails\022\027\n\017next_page_token\030\002 \001(\t\"\326\001\n\027" + + "PatchJobInstanceDetails\0222\n\004name\030\001 \001(\tB$\372" + + "A!\n\037compute.googleapis.com/Instance\022\032\n\022i" + + "nstance_system_id\030\002 \001(\t\022<\n\005state\030\003 \001(\0162-" + + ".google.cloud.osconfig.v1.Instance.Patch" + + "State\022\026\n\016failure_reason\030\004 \001(\t\022\025\n\rattempt" + + "_count\030\005 \001(\003\"\222\001\n\024ListPatchJobsRequest\022C\n" + + "\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemana" + + "ger.googleapis.com/Project\022\021\n\tpage_size\030" + + "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(" + + "\t\"h\n\025ListPatchJobsResponse\0226\n\npatch_jobs" + + "\030\001 \003(\0132\".google.cloud.osconfig.v1.PatchJ" + + "ob\022\027\n\017next_page_token\030\002 \001(\t\"\243\013\n\010PatchJob" + + "\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\016 \001(\t\022\023\n\013" + + "description\030\002 \001(\t\022/\n\013create_time\030\003 \001(\0132\032" + + ".google.protobuf.Timestamp\022/\n\013update_tim" + + "e\030\004 \001(\0132\032.google.protobuf.Timestamp\0227\n\005s" + + "tate\030\005 \001(\0162(.google.cloud.osconfig.v1.Pa" + + "tchJob.State\022F\n\017instance_filter\030\r \001(\0132-." + + "google.cloud.osconfig.v1.PatchInstanceFi" + + "lter\022;\n\014patch_config\030\007 \001(\0132%.google.clou" + + "d.osconfig.v1.PatchConfig\022+\n\010duration\030\010 " + + "\001(\0132\031.google.protobuf.Duration\022[\n\030instan" + + "ce_details_summary\030\t \001(\01329.google.cloud." + + "osconfig.v1.PatchJob.InstanceDetailsSumm" + + "ary\022\017\n\007dry_run\030\n \001(\010\022\025\n\rerror_message\030\013 " + + "\001(\t\022\030\n\020percent_complete\030\014 \001(\001\022I\n\020patch_d" + + "eployment\030\017 \001(\tB/\340A\003\372A)\n\'osconfig.google" + + "apis.com/PatchDeployment\032\275\004\n\026InstanceDet" + + "ailsSummary\022\036\n\026pending_instance_count\030\001 " + + "\001(\003\022\037\n\027inactive_instance_count\030\002 \001(\003\022\037\n\027" + + "notified_instance_count\030\003 \001(\003\022\036\n\026started" + + "_instance_count\030\004 \001(\003\022*\n\"downloading_pat" + + "ches_instance_count\030\005 \001(\003\022\'\n\037applying_pa" + + "tches_instance_count\030\006 \001(\003\022 \n\030rebooting_" + + "instance_count\030\007 \001(\003\022 \n\030succeeded_instan" + + "ce_count\030\010 \001(\003\0220\n(succeeded_reboot_requi" + + "red_instance_count\030\t \001(\003\022\035\n\025failed_insta" + + "nce_count\030\n \001(\003\022\034\n\024acked_instance_count\030" + + "\013 \001(\003\022 \n\030timed_out_instance_count\030\014 \001(\003\022" + + "%\n\035pre_patch_step_instance_count\030\r \001(\003\022&" + + "\n\036post_patch_step_instance_count\030\016 \001(\003\022(" + + "\n no_agent_detected_instance_count\030\017 \001(\003" + + "\"\225\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007STA" + + "RTED\020\001\022\023\n\017INSTANCE_LOOKUP\020\002\022\014\n\010PATCHING\020" + + "\003\022\r\n\tSUCCEEDED\020\004\022\031\n\025COMPLETED_WITH_ERROR" + + "S\020\005\022\014\n\010CANCELED\020\006\022\r\n\tTIMED_OUT\020\007:O\352AL\n o" + + "sconfig.googleapis.com/PatchJob\022(project" + + "s/{project}/patchJobs/{patch_job}\"\267\004\n\013Pa" + + "tchConfig\022I\n\rreboot_config\030\001 \001(\01622.googl" + + "e.cloud.osconfig.v1.PatchConfig.RebootCo" + + "nfig\0222\n\003apt\030\003 \001(\0132%.google.cloud.osconfi" + + "g.v1.AptSettings\0222\n\003yum\030\004 \001(\0132%.google.c" + + "loud.osconfig.v1.YumSettings\0222\n\003goo\030\005 \001(" + + "\0132%.google.cloud.osconfig.v1.GooSettings" + + "\0228\n\006zypper\030\006 \001(\0132(.google.cloud.osconfig" + + ".v1.ZypperSettings\022G\n\016windows_update\030\007 \001" + + "(\0132/.google.cloud.osconfig.v1.WindowsUpd" + + "ateSettings\0224\n\010pre_step\030\010 \001(\0132\".google.c" + + "loud.osconfig.v1.ExecStep\0225\n\tpost_step\030\t" + + " \001(\0132\".google.cloud.osconfig.v1.ExecStep" + + "\"Q\n\014RebootConfig\022\035\n\031REBOOT_CONFIG_UNSPEC" + + "IFIED\020\000\022\013\n\007DEFAULT\020\001\022\n\n\006ALWAYS\020\002\022\t\n\005NEVE" + + "R\020\003\"\316\002\n\010Instance\"\301\002\n\nPatchState\022\033\n\027PATCH" + + "_STATE_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\014\n\010INA" + + "CTIVE\020\002\022\014\n\010NOTIFIED\020\003\022\013\n\007STARTED\020\004\022\027\n\023DO" + + "WNLOADING_PATCHES\020\005\022\024\n\020APPLYING_PATCHES\020" + + "\006\022\r\n\tREBOOTING\020\007\022\r\n\tSUCCEEDED\020\010\022\035\n\031SUCCE" + + "EDED_REBOOT_REQUIRED\020\t\022\n\n\006FAILED\020\n\022\t\n\005AC" + + "KED\020\013\022\r\n\tTIMED_OUT\020\014\022\032\n\026RUNNING_PRE_PATC" + + "H_STEP\020\r\022\033\n\027RUNNING_POST_PATCH_STEP\020\016\022\025\n" + + "\021NO_AGENT_DETECTED\020\017\"O\n\025CancelPatchJobRe" + + "quest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n osconfig.go" + + "ogleapis.com/PatchJob\"\252\001\n\013AptSettings\0228\n" + + "\004type\030\001 \001(\0162*.google.cloud.osconfig.v1.A" + + "ptSettings.Type\022\020\n\010excludes\030\002 \003(\t\022\032\n\022exc" + + "lusive_packages\030\003 \003(\t\"3\n\004Type\022\024\n\020TYPE_UN" + + "SPECIFIED\020\000\022\010\n\004DIST\020\001\022\013\n\007UPGRADE\020\002\"^\n\013Yu" + + "mSettings\022\020\n\010security\030\001 \001(\010\022\017\n\007minimal\030\002" + + " \001(\010\022\020\n\010excludes\030\003 \003(\t\022\032\n\022exclusive_pack" + + "ages\030\004 \003(\t\"\r\n\013GooSettings\"\221\001\n\016ZypperSett" + + "ings\022\025\n\rwith_optional\030\001 \001(\010\022\023\n\013with_upda" + + "te\030\002 \001(\010\022\022\n\ncategories\030\003 \003(\t\022\022\n\nseveriti" + + "es\030\004 \003(\t\022\020\n\010excludes\030\005 \003(\t\022\031\n\021exclusive_" + + "patches\030\006 \003(\t\"\325\002\n\025WindowsUpdateSettings\022" + + "W\n\017classifications\030\001 \003(\0162>.google.cloud." + + "osconfig.v1.WindowsUpdateSettings.Classi" + + "fication\022\020\n\010excludes\030\002 \003(\t\022\031\n\021exclusive_" + + "patches\030\003 \003(\t\"\265\001\n\016Classification\022\036\n\032CLAS" + + "SIFICATION_UNSPECIFIED\020\000\022\014\n\010CRITICAL\020\001\022\014" + + "\n\010SECURITY\020\002\022\016\n\nDEFINITION\020\003\022\n\n\006DRIVER\020\004" + + "\022\020\n\014FEATURE_PACK\020\005\022\020\n\014SERVICE_PACK\020\006\022\010\n\004" + + "TOOL\020\007\022\021\n\rUPDATE_ROLLUP\020\010\022\n\n\006UPDATE\020\t\"\240\001" + + "\n\010ExecStep\022H\n\026linux_exec_step_config\030\001 \001" + + "(\0132(.google.cloud.osconfig.v1.ExecStepCo" + + "nfig\022J\n\030windows_exec_step_config\030\002 \001(\0132(" + + ".google.cloud.osconfig.v1.ExecStepConfig" + + "\"\240\002\n\016ExecStepConfig\022\024\n\nlocal_path\030\001 \001(\tH" + + "\000\0229\n\ngcs_object\030\002 \001(\0132#.google.cloud.osc" + + "onfig.v1.GcsObjectH\000\022\035\n\025allowed_success_" + + "codes\030\003 \003(\005\022I\n\013interpreter\030\004 \001(\01624.googl" + + "e.cloud.osconfig.v1.ExecStepConfig.Inter" + + "preter\"E\n\013Interpreter\022\033\n\027INTERPRETER_UNS" + + "PECIFIED\020\000\022\t\n\005SHELL\020\001\022\016\n\nPOWERSHELL\020\002B\014\n" + + "\nexecutable\"U\n\tGcsObject\022\023\n\006bucket\030\001 \001(\t" + + "B\003\340A\002\022\023\n\006object\030\002 \001(\tB\003\340A\002\022\036\n\021generation" + + "_number\030\003 \001(\003B\003\340A\002\"\310\002\n\023PatchInstanceFilt" + + "er\022\013\n\003all\030\001 \001(\010\022N\n\014group_labels\030\002 \003(\01328." + + "google.cloud.osconfig.v1.PatchInstanceFi" + + "lter.GroupLabel\022\r\n\005zones\030\003 \003(\t\022\021\n\tinstan" + + "ces\030\004 \003(\t\022\036\n\026instance_name_prefixes\030\005 \003(" + + "\t\032\221\001\n\nGroupLabel\022T\n\006labels\030\001 \003(\0132D.googl" + + "e.cloud.osconfig.v1.PatchInstanceFilter." + + "GroupLabel.LabelsEntry\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\277\001\n\034com.go" + + "ogle.cloud.osconfig.v1B\tPatchJobsZ@googl" + + "e.golang.org/genproto/googleapis/cloud/o" + + "sconfig/v1;osconfig\252\002\030Google.Cloud.OsCon" + + "fig.V1\312\002\030Google\\Cloud\\OsConfig\\V1\352\002\033Goog" + + "le::Cloud::OsConfig::V1b\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(), + }); + internal_static_google_cloud_osconfig_v1_ExecutePatchJobRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1_ExecutePatchJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_ExecutePatchJobRequest_descriptor, + new java.lang.String[] { + "Parent", + "Description", + "InstanceFilter", + "PatchConfig", + "Duration", + "DryRun", + "DisplayName", + }); + internal_static_google_cloud_osconfig_v1_GetPatchJobRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1_GetPatchJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_GetPatchJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_ListPatchJobInstanceDetailsResponse_descriptor, + new java.lang.String[] { + "PatchJobInstanceDetails", "NextPageToken", + }); + internal_static_google_cloud_osconfig_v1_PatchJobInstanceDetails_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_osconfig_v1_PatchJobInstanceDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_PatchJobInstanceDetails_descriptor, + new java.lang.String[] { + "Name", "InstanceSystemId", "State", "FailureReason", "AttemptCount", + }); + internal_static_google_cloud_osconfig_v1_ListPatchJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_osconfig_v1_ListPatchJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_ListPatchJobsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_osconfig_v1_ListPatchJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_osconfig_v1_ListPatchJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_ListPatchJobsResponse_descriptor, + new java.lang.String[] { + "PatchJobs", "NextPageToken", + }); + internal_static_google_cloud_osconfig_v1_PatchJob_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_osconfig_v1_PatchJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_PatchJob_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "CreateTime", + "UpdateTime", + "State", + "InstanceFilter", + "PatchConfig", + "Duration", + "InstanceDetailsSummary", + "DryRun", + "ErrorMessage", + "PercentComplete", + "PatchDeployment", + }); + internal_static_google_cloud_osconfig_v1_PatchJob_InstanceDetailsSummary_descriptor = + internal_static_google_cloud_osconfig_v1_PatchJob_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_osconfig_v1_PatchJob_InstanceDetailsSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_PatchJob_InstanceDetailsSummary_descriptor, + new java.lang.String[] { + "PendingInstanceCount", + "InactiveInstanceCount", + "NotifiedInstanceCount", + "StartedInstanceCount", + "DownloadingPatchesInstanceCount", + "ApplyingPatchesInstanceCount", + "RebootingInstanceCount", + "SucceededInstanceCount", + "SucceededRebootRequiredInstanceCount", + "FailedInstanceCount", + "AckedInstanceCount", + "TimedOutInstanceCount", + "PrePatchStepInstanceCount", + "PostPatchStepInstanceCount", + "NoAgentDetectedInstanceCount", + }); + internal_static_google_cloud_osconfig_v1_PatchConfig_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_osconfig_v1_PatchConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_PatchConfig_descriptor, + new java.lang.String[] { + "RebootConfig", "Apt", "Yum", "Goo", "Zypper", "WindowsUpdate", "PreStep", "PostStep", + }); + internal_static_google_cloud_osconfig_v1_Instance_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_osconfig_v1_Instance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_Instance_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_osconfig_v1_CancelPatchJobRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_osconfig_v1_CancelPatchJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_CancelPatchJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1_AptSettings_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_osconfig_v1_AptSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_AptSettings_descriptor, + new java.lang.String[] { + "Type", "Excludes", "ExclusivePackages", + }); + internal_static_google_cloud_osconfig_v1_YumSettings_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_osconfig_v1_YumSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_YumSettings_descriptor, + new java.lang.String[] { + "Security", "Minimal", "Excludes", "ExclusivePackages", + }); + internal_static_google_cloud_osconfig_v1_GooSettings_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_osconfig_v1_GooSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_GooSettings_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_osconfig_v1_ZypperSettings_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_osconfig_v1_ZypperSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_ZypperSettings_descriptor, + new java.lang.String[] { + "WithOptional", + "WithUpdate", + "Categories", + "Severities", + "Excludes", + "ExclusivePatches", + }); + internal_static_google_cloud_osconfig_v1_WindowsUpdateSettings_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_osconfig_v1_WindowsUpdateSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_WindowsUpdateSettings_descriptor, + new java.lang.String[] { + "Classifications", "Excludes", "ExclusivePatches", + }); + internal_static_google_cloud_osconfig_v1_ExecStep_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_osconfig_v1_ExecStep_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_ExecStep_descriptor, + new java.lang.String[] { + "LinuxExecStepConfig", "WindowsExecStepConfig", + }); + internal_static_google_cloud_osconfig_v1_ExecStepConfig_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_osconfig_v1_ExecStepConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_ExecStepConfig_descriptor, + new java.lang.String[] { + "LocalPath", "GcsObject", "AllowedSuccessCodes", "Interpreter", "Executable", + }); + internal_static_google_cloud_osconfig_v1_GcsObject_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_osconfig_v1_GcsObject_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_GcsObject_descriptor, + new java.lang.String[] { + "Bucket", "Object", "GenerationNumber", + }); + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_descriptor, + new java.lang.String[] { + "All", "GroupLabels", "Zones", "Instances", "InstanceNamePrefixes", + }); + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_descriptor = + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_descriptor, + new java.lang.String[] { + "Labels", + }); + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_LabelsEntry_descriptor = + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1_PatchInstanceFilter_GroupLabel_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/osconfig_service.proto b/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/osconfig_service.proto new file mode 100644 index 00000000..6fada486 --- /dev/null +++ b/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/osconfig_service.proto @@ -0,0 +1,114 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.osconfig.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/cloud/osconfig/v1/patch_deployments.proto"; +import "google/cloud/osconfig/v1/patch_jobs.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_outer_classname = "OsConfigProto"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// OS Config API +// +// The OS Config service is a server-side component that you can use to +// manage package installations and patch jobs for virtual machine instances. +service OsConfigService { + option (google.api.default_host) = "osconfig.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Patch VM instances by creating and running a patch job. + rpc ExecutePatchJob(ExecutePatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/patchJobs:execute" + body: "*" + }; + } + + // Get the patch job. This can be used to track the progress of an + // ongoing patch job or review the details of completed jobs. + rpc GetPatchJob(GetPatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/patchJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Cancel a patch job. The patch job must be active. Canceled patch jobs + // cannot be restarted. + rpc CancelPatchJob(CancelPatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + post: "/v1/{name=projects/*/patchJobs/*}:cancel" + body: "*" + }; + } + + // Get a list of patch jobs. + rpc ListPatchJobs(ListPatchJobsRequest) returns (ListPatchJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/patchJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Get a list of instance details for a given patch job. + rpc ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest) returns (ListPatchJobInstanceDetailsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/patchJobs/*}/instanceDetails" + }; + option (google.api.method_signature) = "parent"; + } + + // Create an OS Config patch deployment. + rpc CreatePatchDeployment(CreatePatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/patchDeployments" + body: "patch_deployment" + }; + option (google.api.method_signature) = "parent,patch_deployment,patch_deployment_id"; + } + + // Get an OS Config patch deployment. + rpc GetPatchDeployment(GetPatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/patchDeployments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get a page of OS Config patch deployments. + rpc ListPatchDeployments(ListPatchDeploymentsRequest) returns (ListPatchDeploymentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/patchDeployments" + }; + option (google.api.method_signature) = "parent"; + } + + // Delete an OS Config patch deployment. + rpc DeletePatchDeployment(DeletePatchDeploymentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/patchDeployments/*}" + }; + option (google.api.method_signature) = "name"; + } +} diff --git a/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/patch_deployments.proto b/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/patch_deployments.proto new file mode 100644 index 00000000..6760e1cf --- /dev/null +++ b/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/patch_deployments.proto @@ -0,0 +1,255 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.osconfig.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1/patch_jobs.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/datetime.proto"; +import "google/type/dayofweek.proto"; +import "google/type/timeofday.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_outer_classname = "PatchDeployments"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// Patch deployments are configurations that individual patch jobs use to +// complete a patch. These configurations include instance filter, package +// repository settings, and a schedule. For more information about creating and +// managing patch deployments, see [Scheduling patch +// jobs](/compute/docs/os-patch-management/schedule-patch-jobs). +message PatchDeployment { + option (google.api.resource) = { + type: "osconfig.googleapis.com/PatchDeployment" + pattern: "projects/{project}/patchDeployments/{patch_deployment}" + }; + + // Unique name for the patch deployment resource in a project. The patch + // deployment name is in the form: + // `projects/{project_id}/patchDeployments/{patch_deployment_id}`. + // This field is ignored when you create a new patch deployment. + string name = 1; + + // Optional. Description of the patch deployment. Length of the description is limited + // to 1024 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. VM instances to patch. + PatchInstanceFilter instance_filter = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Patch configuration that is applied. + PatchConfig patch_config = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Duration of the patch. After the duration ends, the patch times out. + google.protobuf.Duration duration = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Schedule for the patch. + oneof schedule { + // Required. Schedule a one-time execution. + OneTimeSchedule one_time_schedule = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Schedule recurring executions. + RecurringSchedule recurring_schedule = 7 [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. Time the patch deployment was created. Timestamp is in + // RFC3339 + // text format. + google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the patch deployment was last updated. Timestamp is in + // RFC3339 + // text format. + google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last time a patch job was started by this deployment. + // Timestamp is in + // RFC3339 + // text format. + google.protobuf.Timestamp last_execute_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Sets the time for a one time patch deployment. Timestamp is in +// RFC3339 +// text format. +message OneTimeSchedule { + // Required. The desired patch job execution time. + google.protobuf.Timestamp execute_time = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Sets the time for recurring patch deployments. +message RecurringSchedule { + // Specifies the frequency of the recurring patch deployments. + enum Frequency { + // Invalid. A frequency must be specified. + FREQUENCY_UNSPECIFIED = 0; + + // Indicates that the frequency should be expressed in terms of + // weeks. + WEEKLY = 1; + + // Indicates that the frequency should be expressed in terms of + // months. + MONTHLY = 2; + } + + // Required. Defines the time zone that `time_of_day` is relative to. + // The rules for daylight saving time are determined by the chosen time zone. + google.type.TimeZone time_zone = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The time that the recurring schedule becomes effective. + // Defaults to `create_time` of the patch deployment. + google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The end time at which a recurring patch deployment schedule is no longer + // active. + google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Time of the day to run a recurring deployment. + google.type.TimeOfDay time_of_day = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The frequency unit of this recurring schedule. + Frequency frequency = 5 [(google.api.field_behavior) = REQUIRED]; + + // Configurations for this recurring schedule. + // Configurations must match frequency. + oneof schedule_config { + // Required. Schedule with weekly executions. + WeeklySchedule weekly = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Schedule with monthly executions. + MonthlySchedule monthly = 7 [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. The time the last patch job ran successfully. + google.protobuf.Timestamp last_execute_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the next patch job is scheduled to run. + google.protobuf.Timestamp next_execute_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a weekly schedule. +message WeeklySchedule { + // Required. Day of the week. + google.type.DayOfWeek day_of_week = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents a monthly schedule. An example of a valid monthly schedule is +// "on the third Tuesday of the month" or "on the 15th of the month". +message MonthlySchedule { + // One day in a month. + oneof day_of_month { + // Required. Week day in a month. + WeekDayOfMonth week_day_of_month = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1 + // indicates the last day of the month. + // Months without the target day will be skipped. For example, a schedule to + // run "every month on the 31st" will not run in February, April, June, etc. + int32 month_day = 2 [(google.api.field_behavior) = REQUIRED]; + } +} + +// Represents one week day in a month. An example is "the 4th Sunday". +message WeekDayOfMonth { + // Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1 + // indicates the last week of the month. + int32 week_ordinal = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A day of the week. + google.type.DayOfWeek day_of_week = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message for creating a patch deployment. +message CreatePatchDeploymentRequest { + // Required. The project to apply this patch deployment to in the form `projects/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. A name for the patch deployment in the project. When creating a name + // the following rules apply: + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the project. + string patch_deployment_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The patch deployment to create. + PatchDeployment patch_deployment = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message for retrieving a patch deployment. +message GetPatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} + +// A request message for listing patch deployments. +message ListPatchDeploymentsRequest { + // Required. The resource name of the parent in the form `projects/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Optional. The maximum number of patch deployments to return. Default is 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous call to ListPatchDeployments + // that indicates where this listing should continue from. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response message for listing patch deployments. +message ListPatchDeploymentsResponse { + // The list of patch deployments. + repeated PatchDeployment patch_deployments = 1; + + // A pagination token that can be used to get the next page of patch + // deployments. + string next_page_token = 2; +} + +// A request message for deleting a patch deployment. +message DeletePatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} diff --git a/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/patch_jobs.proto b/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/patch_jobs.proto new file mode 100644 index 00000000..26c2eb83 --- /dev/null +++ b/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/patch_jobs.proto @@ -0,0 +1,678 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.osconfig.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_outer_classname = "PatchJobs"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// A request message to initiate patching across Google Compute Engine +// instances. +message ExecutePatchJobRequest { + // Required. The project in which to run this patch in the form `projects/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Description of the patch job. Length of the description is limited + // to 1024 characters. + string description = 2; + + // Required. Instances to patch, either explicitly or filtered by some criteria such + // as zone or labels. + PatchInstanceFilter instance_filter = 7 [(google.api.field_behavior) = REQUIRED]; + + // Patch configuration being applied. If omitted, instances are + // patched using the default configurations. + PatchConfig patch_config = 4; + + // Duration of the patch job. After the duration ends, the patch job + // times out. + google.protobuf.Duration duration = 5; + + // If this patch is a dry-run only, instances are contacted but + // will do nothing. + bool dry_run = 6; + + // Display name for this patch job. This does not have to be unique. + string display_name = 8; +} + +// Request to get an active or completed patch job. +message GetPatchJobRequest { + // Required. Name of the patch in the form `projects/*/patchJobs/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchJob" + } + ]; +} + +// Request to list details for all instances that are part of a patch job. +message ListPatchJobInstanceDetailsRequest { + // Required. The parent for the instances are in the form of `projects/*/patchJobs/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchJob" + } + ]; + + // The maximum number of instance details records to return. Default is 100. + int32 page_size = 2; + + // A pagination token returned from a previous call + // that indicates where this listing should continue from. + string page_token = 3; + + // A filter expression that filters results listed in the response. This + // field supports filtering results by instance zone, name, state, or + // `failure_reason`. + string filter = 4; +} + +// A response message for listing the instances details for a patch job. +message ListPatchJobInstanceDetailsResponse { + // A list of instance status. + repeated PatchJobInstanceDetails patch_job_instance_details = 1; + + // A pagination token that can be used to get the next page of results. + string next_page_token = 2; +} + +// Patch details for a VM instance. For more information about reviewing VM +// instance details, see +// [Listing all VM instance details for a specific patch +// job](/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details). +message PatchJobInstanceDetails { + // The instance name in the form `projects/*/zones/*/instances/*` + string name = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + }]; + + // The unique identifier for the instance. This identifier is + // defined by the server. + string instance_system_id = 2; + + // Current state of instance patch. + Instance.PatchState state = 3; + + // If the patch fails, this field provides the reason. + string failure_reason = 4; + + // The number of times the agent that the agent attempts to apply the patch. + int64 attempt_count = 5; +} + +// A request message for listing patch jobs. +message ListPatchJobsRequest { + // Required. In the form of `projects/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // The maximum number of instance status to return. + int32 page_size = 2; + + // A pagination token returned from a previous call + // that indicates where this listing should continue from. + string page_token = 3; + + // If provided, this field specifies the criteria that must be met by patch + // jobs to be included in the response. + // Currently, filtering is only available on the patch_deployment field. + string filter = 4; +} + +// A response message for listing patch jobs. +message ListPatchJobsResponse { + // The list of patch jobs. + repeated PatchJob patch_jobs = 1; + + // A pagination token that can be used to get the next page of results. + string next_page_token = 2; +} + +// A high level representation of a patch job that is either in progress +// or has completed. +// +// Instances details are not included in the job. To paginate through instance +// details, use ListPatchJobInstanceDetails. +// +// For more information about patch jobs, see +// [Creating patch jobs](/compute/docs/os-patch-management/create-patch-job). +message PatchJob { + option (google.api.resource) = { + type: "osconfig.googleapis.com/PatchJob" + pattern: "projects/{project}/patchJobs/{patch_job}" + }; + + // A summary of the current patch state across all instances that this patch + // job affects. Contains counts of instances in different states. These states + // map to `InstancePatchState`. List patch job instance details to see the + // specific states of each instance. + message InstanceDetailsSummary { + // Number of instances pending patch job. + int64 pending_instance_count = 1; + + // Number of instances that are inactive. + int64 inactive_instance_count = 2; + + // Number of instances notified about patch job. + int64 notified_instance_count = 3; + + // Number of instances that have started. + int64 started_instance_count = 4; + + // Number of instances that are downloading patches. + int64 downloading_patches_instance_count = 5; + + // Number of instances that are applying patches. + int64 applying_patches_instance_count = 6; + + // Number of instances rebooting. + int64 rebooting_instance_count = 7; + + // Number of instances that have completed successfully. + int64 succeeded_instance_count = 8; + + // Number of instances that require reboot. + int64 succeeded_reboot_required_instance_count = 9; + + // Number of instances that failed. + int64 failed_instance_count = 10; + + // Number of instances that have acked and will start shortly. + int64 acked_instance_count = 11; + + // Number of instances that exceeded the time out while applying the patch. + int64 timed_out_instance_count = 12; + + // Number of instances that are running the pre-patch step. + int64 pre_patch_step_instance_count = 13; + + // Number of instances that are running the post-patch step. + int64 post_patch_step_instance_count = 14; + + // Number of instances that do not appear to be running the agent. Check to + // ensure that the agent is installed, running, and able to communicate with + // the service. + int64 no_agent_detected_instance_count = 15; + } + + // Enumeration of the various states a patch job passes through as it + // executes. + enum State { + // State must be specified. + STATE_UNSPECIFIED = 0; + + // The patch job was successfully initiated. + STARTED = 1; + + // The patch job is looking up instances to run the patch on. + INSTANCE_LOOKUP = 2; + + // Instances are being patched. + PATCHING = 3; + + // Patch job completed successfully. + SUCCEEDED = 4; + + // Patch job completed but there were errors. + COMPLETED_WITH_ERRORS = 5; + + // The patch job was canceled. + CANCELED = 6; + + // The patch job timed out. + TIMED_OUT = 7; + } + + // Unique identifier for this patch job in the form + // `projects/*/patchJobs/*` + string name = 1; + + // Display name for this patch job. This is not a unique identifier. + string display_name = 14; + + // Description of the patch job. Length of the description is limited + // to 1024 characters. + string description = 2; + + // Time this patch job was created. + google.protobuf.Timestamp create_time = 3; + + // Last time this patch job was updated. + google.protobuf.Timestamp update_time = 4; + + // The current state of the PatchJob . + State state = 5; + + // Instances to patch. + PatchInstanceFilter instance_filter = 13; + + // Patch configuration being applied. + PatchConfig patch_config = 7; + + // Duration of the patch job. After the duration ends, the + // patch job times out. + google.protobuf.Duration duration = 8; + + // Summary of instance details. + InstanceDetailsSummary instance_details_summary = 9; + + // If this patch job is a dry run, the agent reports that it has + // finished without running any updates on the VM instance. + bool dry_run = 10; + + // If this patch job failed, this message provides information about the + // failure. + string error_message = 11; + + // Reflects the overall progress of the patch job in the range of + // 0.0 being no progress to 100.0 being complete. + double percent_complete = 12; + + // Output only. Name of the patch deployment that created this patch job. + string patch_deployment = 15 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} + +// Patch configuration specifications. Contains details on how to apply the +// patch(es) to a VM instance. +message PatchConfig { + // Post-patch reboot settings. + enum RebootConfig { + // The default behavior is DEFAULT. + REBOOT_CONFIG_UNSPECIFIED = 0; + + // The agent decides if a reboot is necessary by checking signals such as + // registry keys on Windows or `/var/run/reboot-required` on APT based + // systems. On RPM based systems, a set of core system package install times + // are compared with system boot time. + DEFAULT = 1; + + // Always reboot the machine after the update completes. + ALWAYS = 2; + + // Never reboot the machine after the update completes. + NEVER = 3; + } + + // Post-patch reboot settings. + RebootConfig reboot_config = 1; + + // Apt update settings. Use this setting to override the default `apt` patch + // rules. + AptSettings apt = 3; + + // Yum update settings. Use this setting to override the default `yum` patch + // rules. + YumSettings yum = 4; + + // Goo update settings. Use this setting to override the default `goo` patch + // rules. + GooSettings goo = 5; + + // Zypper update settings. Use this setting to override the default `zypper` + // patch rules. + ZypperSettings zypper = 6; + + // Windows update settings. Use this override the default windows patch rules. + WindowsUpdateSettings windows_update = 7; + + // The `ExecStep` to run before the patch update. + ExecStep pre_step = 8; + + // The `ExecStep` to run after the patch update. + ExecStep post_step = 9; +} + +// Namespace for instance state enums. +message Instance { + // Patch state of an instance. + enum PatchState { + // Unspecified. + PATCH_STATE_UNSPECIFIED = 0; + + // The instance is not yet notified. + PENDING = 1; + + // Instance is inactive and cannot be patched. + INACTIVE = 2; + + // The instance is notified that it should be patched. + NOTIFIED = 3; + + // The instance has started the patching process. + STARTED = 4; + + // The instance is downloading patches. + DOWNLOADING_PATCHES = 5; + + // The instance is applying patches. + APPLYING_PATCHES = 6; + + // The instance is rebooting. + REBOOTING = 7; + + // The instance has completed applying patches. + SUCCEEDED = 8; + + // The instance has completed applying patches but a reboot is required. + SUCCEEDED_REBOOT_REQUIRED = 9; + + // The instance has failed to apply the patch. + FAILED = 10; + + // The instance acked the notification and will start shortly. + ACKED = 11; + + // The instance exceeded the time out while applying the patch. + TIMED_OUT = 12; + + // The instance is running the pre-patch step. + RUNNING_PRE_PATCH_STEP = 13; + + // The instance is running the post-patch step. + RUNNING_POST_PATCH_STEP = 14; + + // The service could not detect the presence of the agent. Check to ensure + // that the agent is installed, running, and able to communicate with the + // service. + NO_AGENT_DETECTED = 15; + } + + +} + +// Message for canceling a patch job. +message CancelPatchJobRequest { + // Required. Name of the patch in the form `projects/*/patchJobs/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchJob" + } + ]; +} + +// Apt patching is completed by executing `apt-get update && apt-get +// upgrade`. Additional options can be set to control how this is executed. +message AptSettings { + // Apt patch type. + enum Type { + // By default, upgrade will be performed. + TYPE_UNSPECIFIED = 0; + + // Runs `apt-get dist-upgrade`. + DIST = 1; + + // Runs `apt-get upgrade`. + UPGRADE = 2; + } + + // By changing the type to DIST, the patching is performed + // using `apt-get dist-upgrade` instead. + Type type = 1; + + // List of packages to exclude from update. These packages will be excluded + repeated string excludes = 2; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field cannot be specified with any other patch configuration + // fields. + repeated string exclusive_packages = 3; +} + +// Yum patching is performed by executing `yum update`. Additional options +// can be set to control how this is executed. +// +// Note that not all settings are supported on all platforms. +message YumSettings { + // Adds the `--security` flag to `yum update`. Not supported on + // all platforms. + bool security = 1; + + // Will cause patch to run `yum update-minimal` instead. + bool minimal = 2; + + // List of packages to exclude from update. These packages are excluded by + // using the yum `--exclude` flag. + repeated string excludes = 3; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field must not be specified with any other patch + // configuration fields. + repeated string exclusive_packages = 4; +} + +// Googet patching is performed by running `googet update`. +message GooSettings { + +} + +// Zypper patching is performed by running `zypper patch`. +// See also https://en.opensuse.org/SDB:Zypper_manual. +message ZypperSettings { + // Adds the `--with-optional` flag to `zypper patch`. + bool with_optional = 1; + + // Adds the `--with-update` flag, to `zypper patch`. + bool with_update = 2; + + // Install only patches with these categories. + // Common categories include security, recommended, and feature. + repeated string categories = 3; + + // Install only patches with these severities. + // Common severities include critical, important, moderate, and low. + repeated string severities = 4; + + // List of patches to exclude from update. + repeated string excludes = 5; + + // An exclusive list of patches to be updated. These are the only patches + // that will be installed using 'zypper patch patch:' command. + // This field must not be used with any other patch configuration fields. + repeated string exclusive_patches = 6; +} + +// Windows patching is performed using the Windows Update Agent. +message WindowsUpdateSettings { + // Microsoft Windows update classifications as defined in + // [1] + // https://support.microsoft.com/en-us/help/824684/description-of-the-standard-terminology-that-is-used-to-describe-micro + enum Classification { + // Invalid. If classifications are included, they must be specified. + CLASSIFICATION_UNSPECIFIED = 0; + + // "A widely released fix for a specific problem that addresses a critical, + // non-security-related bug." [1] + CRITICAL = 1; + + // "A widely released fix for a product-specific, security-related + // vulnerability. Security vulnerabilities are rated by their severity. The + // severity rating is indicated in the Microsoft security bulletin as + // critical, important, moderate, or low." [1] + SECURITY = 2; + + // "A widely released and frequent software update that contains additions + // to a product's definition database. Definition databases are often used + // to detect objects that have specific attributes, such as malicious code, + // phishing websites, or junk mail." [1] + DEFINITION = 3; + + // "Software that controls the input and output of a device." [1] + DRIVER = 4; + + // "New product functionality that is first distributed outside the context + // of a product release and that is typically included in the next full + // product release." [1] + FEATURE_PACK = 5; + + // "A tested, cumulative set of all hotfixes, security updates, critical + // updates, and updates. Additionally, service packs may contain additional + // fixes for problems that are found internally since the release of the + // product. Service packs my also contain a limited number of + // customer-requested design changes or features." [1] + SERVICE_PACK = 6; + + // "A utility or feature that helps complete a task or set of tasks." [1] + TOOL = 7; + + // "A tested, cumulative set of hotfixes, security updates, critical + // updates, and updates that are packaged together for easy deployment. A + // rollup generally targets a specific area, such as security, or a + // component of a product, such as Internet Information Services (IIS)." [1] + UPDATE_ROLLUP = 8; + + // "A widely released fix for a specific problem. An update addresses a + // noncritical, non-security-related bug." [1] + UPDATE = 9; + } + + // Only apply updates of these windows update classifications. If empty, all + // updates are applied. + repeated Classification classifications = 1; + + // List of KBs to exclude from update. + repeated string excludes = 2; + + // An exclusive list of kbs to be updated. These are the only patches + // that will be updated. This field must not be used with other + // patch configurations. + repeated string exclusive_patches = 3; +} + +// A step that runs an executable for a PatchJob. +message ExecStep { + // The ExecStepConfig for all Linux VMs targeted by the PatchJob. + ExecStepConfig linux_exec_step_config = 1; + + // The ExecStepConfig for all Windows VMs targeted by the PatchJob. + ExecStepConfig windows_exec_step_config = 2; +} + +// Common configurations for an ExecStep. +message ExecStepConfig { + // The interpreter used to execute the a file. + enum Interpreter { + // Invalid for a Windows ExecStepConfig. For a Linux ExecStepConfig, the + // interpreter will be parsed from the shebang line of the script if + // unspecified. + INTERPRETER_UNSPECIFIED = 0; + + // Indicates that the script is run with `/bin/sh` on Linux and `cmd` + // on Windows. + SHELL = 1; + + // Indicates that the file is run with PowerShell flags + // `-NonInteractive`, `-NoProfile`, and `-ExecutionPolicy Bypass`. + POWERSHELL = 2; + } + + // Location of the executable. + oneof executable { + // An absolute path to the executable on the VM. + string local_path = 1; + + // A Google Cloud Storage object containing the executable. + GcsObject gcs_object = 2; + } + + // Defaults to [0]. A list of possible return values that the + // execution can return to indicate a success. + repeated int32 allowed_success_codes = 3; + + // The script interpreter to use to run the script. If no interpreter is + // specified the script will be executed directly, which will likely + // only succeed for scripts with [shebang lines] + // (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). + Interpreter interpreter = 4; +} + +// Google Cloud Storage object representation. +message GcsObject { + // Required. Bucket of the Google Cloud Storage object. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the Google Cloud Storage object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Generation number of the Google Cloud Storage object. This is used to + // ensure that the ExecStep specified by this PatchJob does not change. + int64 generation_number = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A filter to target VM instances for patching. The targeted +// VMs must meet all criteria specified. So if both labels and zones are +// specified, the patch job targets only VMs with those labels and in those +// zones. +message PatchInstanceFilter { + // Represents a group of VMs that can be identified as having all these + // labels, for example "env=prod and app=web". + message GroupLabel { + // Google Compute Engine instance labels that must be present for a VM + // instance to be targeted by this filter. + map labels = 1; + } + + // Target all VM instances in the project. If true, no other criteria is + // permitted. + bool all = 1; + + // Targets VM instances matching at least one of these label sets. This allows + // targeting of disparate groups, for example "env=prod or env=staging". + repeated GroupLabel group_labels = 2; + + // Targets VM instances in ANY of these zones. Leave empty to target VM + // instances in any zone. + repeated string zones = 3; + + // Targets any of the VM instances specified. Instances are specified by their + // URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME], + // `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or + // `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` + repeated string instances = 4; + + // Targets VMs whose name starts with one of these prefixes. Similar to + // labels, this is another way to group VMs when targeting configs, for + // example prefix="prod-". + repeated string instance_name_prefixes = 5; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..9bdb50a0 --- /dev/null +++ b/renovate.json @@ -0,0 +1,80 @@ +{ + "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-os-config", + "^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 +} \ 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..498fe8c1 --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + os-config-install-without-bom + jar + Google OS Config API Install Without Bom + https://github.com/googleapis/java-os-config + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-os-config + 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..eace47c7 --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-os-config-samples + 0.0.1-SNAPSHOT + pom + Google OS Config API Samples Parent + https://github.com/googleapis/java-os-config + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 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..407506f3 --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + os-config-snapshot + jar + Google OS Config API Snapshot Samples + https://github.com/googleapis/java-os-config + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-os-config + 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..f9ffc739 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + com.google.cloud + os-config-snippets + jar + Google OS Config API Snippets + https://github.com/googleapis/java-os-config + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + + com.google.cloud + libraries-bom + 4.3.0 + pom + import + + + + + + + com.google.cloud + google-cloud-os-config + + + + + 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..c35b5a52 --- /dev/null +++ b/synth.metadata @@ -0,0 +1,33 @@ +{ + "updateTime": "2020-04-03T21:52:53.059389Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "23848c8f64a5e81a239d6133378468185f1756dc", + "internalRef": "304696192", + "log": "23848c8f64a5e81a239d6133378468185f1756dc\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304696192\n\n9514fa9e390a4c0715972c5b510cf4c10ad049a1\ndocs: change relative URLs to absolute URLs to fix broken links.\n\nPiperOrigin-RevId: 304695334\n\n0f7b1509a9a452808c3d07fe90fedfcea763d7d5\nfix: change config_schema_version to 2.0.0 for containeranalysis v1 gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304672648\n\n3d52f3c126fbfc31f067a7f54737b7f0dfbce163\nDialogflow weekly v2 library update:\n- Change `parent` field's resource_reference to specify child_type instead of type per client library generation requirement;\n- Change Session with its child resource pattern to support both projects/{project}/agent/sessions/{session} and projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session};\n- Fix `method_signature`\n- Regular documentation update\n\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 304635286\n\n4a6a01ce0ead505c245d11a2ce156de34800c58f\ndocs: change a relative URL to an absolute URL to fix broken links.\n\nPiperOrigin-RevId: 304633630\n\n1b969c28a6579265e89cd35e6c2ecacc89970e2d\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304620317\n\n5378173a889f9c7d83e36e52d38a6267190de692\nAdd v1beta2 SubmitJobAsOperation RPC to Dataproc.\n\nPiperOrigin-RevId: 304594381\n\n3d5d228a58bdf875e6147b228db3159010c735ee\nEnable visibility on the GetSnapshot and GetTopicSnapshots methods\n\nPiperOrigin-RevId: 304500143\n\n1346f5c11a0376bc82c5c03259b304de52671518\nRefresh public client library for Cloud Monitoring.\nIncrease default ListTimeSeries deadline to 90s.\n\nPiperOrigin-RevId: 304467075\n\n4a6cfccb4a32cb28db7366295d90078c6af3112f\ndocs: Fix link in monitoring summary description.\n\nPiperOrigin-RevId: 304438717\n\n6e2ea9a4b63a264090f1bd4b5b25766a3f634f3a\nfix: add interface name overrides back to logging gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304438432\n\n01f3ccbaa66cf3ae4e3b9fd140b1ecfbe54a3ed0\nFix: Add package/namespace options for C#, Ruby and PHP in remaining protos.\n\nPiperOrigin-RevId: 304416658\n\nb89abbf12cd3c086abddcd79adb0a653349f960a\nchore(google/maps): Rename nox.py to noxfile.py\n\nupstream wip fix here: https://github.com/googleapis/gapic-generator/pull/3156\n\nPiperOrigin-RevId: 304411146\n\nbbf26d7f11fae7789b13959bf100983c496c9807\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 304409906\n\n75047719f704d61f405cac6d7439637ab36c1232\nfix Dataproc: add missing `REQUIRED` annotation.\n\nPiperOrigin-RevId: 304305096\n\n7e1b880fd5d477176cf9b0bb9b137b9bea56e787\nAdd Ruby/PHP namespace options\n\nPiperOrigin-RevId: 304288402\n\naba342359b6743353195ca53f944fe71e6fb6cd4\nchore: add java assembly target for accesscontextmanager BUILD.bazel\n\nPiperOrigin-RevId: 304207684\n\ndc65f39f33cb139b3a2244199a3e722a4d94b679\nFor Secret Manager v1 and v1beta1, noted Secret ID character limitations.\n\nPiperOrigin-RevId: 304035052\n\n2ee8c4d06db823c29a127709e66c35e38b6e98ab\nchore(deps): Update gax-java dependency\nThis is to integrate java11 incompatibility fix\n\nPiperOrigin-RevId: 304032057\n\nb5c94cec71ea9b840dc0110a0275323313ecc85a\nchore: add java assembly target for orgpolicy BUILD.bazel\n\nPiperOrigin-RevId: 304021854\n\n690f4d6344197fde775230cec165a9db3b3929c7\nchore: use the latest protoc-java-resource-name-plugin in third_party/googleapis WORKSPACE.\n- trace up only one level when calculating parent types with singleton resource names\n\nPiperOrigin-RevId: 304007414\n\n87144228bd9920b824996355f27891310fad5a32\nEnable gapic v2 for DLP.\n\nCommitter: @hzyi-google\nPiperOrigin-RevId: 303999064\n\n17cfae00f2bb51cb1683f017da7e295a1b0f01a8\nAdd a new AuthorizationType for Data Source Definition.\n\nPiperOrigin-RevId: 303992863\n\n6da3d64919c006ef40cad2026f1e39084253afe2\nfix(google/maps): Change importpath to developers.google.com/maps/go.\n\nPiperOrigin-RevId: 303976942\n\n2983dccde54f0ce31793e1e628379616c468aea0\nbuild(google/maps): only modify root build.gradle with ext plugin\n\nPiperOrigin-RevId: 303975876\n\n00f0a285f2716ce57e98afe500e450b17b556ff8\nfix: Integerate gapic-generator java_gapic rules Java11 fix\n\nPiperOrigin-RevId: 303899179\n\na62857d26bd2ae15aec13a9244989e4104195b63\nfix: add proto_package to the artman config of dataproc v1beta2 to make artman smoketest pass.\n\nPiperOrigin-RevId: 303853989\n\nf260ba248df934fd4ddc22950fb529a59d79e0b5\nchore: use the latest gapic-generator in googleapis WORKSPACE.\n- PHP multi-pattern resource name support.\n- Trace up only one level when calculating parent types with singleton resource names\n\nPiperOrigin-RevId: 303836059\n\n89c7d455fffa5d8a7e73c2f4da43a74605ed72a6\nfeat: Add client library options to OsConfigService v1 patch APIs.\n\nPiperOrigin-RevId: 303831150\n\na45b0a2a8f6f497547ab531a4da978c76441d076\ndataproc: add back non-default retry parameters.\ncommitter: @hzyi-google\n\nPiperOrigin-RevId: 303830177\n\nad895ce95f1f6d2261fbbc3e8897958294e4f017\nenable gapic v2 for containeranalysis.\ncommitter: @hzyi-google\n\nPiperOrigin-RevId: 303821111\n\nbaf83e521834b67397839bcbe2d7864b49e38787\nAdding \"resource_reference\" annotations to services.\n\nPiperOrigin-RevId: 303791704\n\n7be2811ad17013a5ea24cd75dfd9e399dd6e18fe\nfix: Update gapic-generator version to pickup discogapic fixes\n\nPiperOrigin-RevId: 303545940\n\nb655808b3481a92f478ae2f828a6ce8220e40f32\ncloudasset: add org policy and access context manager protos to client libraries.\n\nPiperOrigin-RevId: 303527638\n\nd8c5da9a9471659b51d5862dd2ea7ad3c4bc49ef\nPopulate BAZEL.build files for AccessContextManager.\n\nPiperOrigin-RevId: 303526825\n\ncf9db7161cb9d4dbef06cd8bf5354ec485e51e2d\nPopulate BAZEL.build files for OrgPolicy.\n\nPiperOrigin-RevId: 303526702\n\n558b800ed594acc02555cc560fbb39c0e42bc438\nchore: turn on gapic v2 for Dataproc API.\nfix:\n- add missing method signatures\n- remove resource_reference not on a string field\n- adjust resource name pattern orders\n\nPiperOrigin-RevId: 303431167\n\n8eb444cf5ff63f68d826acbb37b2ac3da58655fb\nAdd logging protos for Recommender v1beta1.\n\nPiperOrigin-RevId: 303426030\n\n48a166ce9f6e2a88b10947341b37336fe9dd3478\nPush of PHP, C# and Ruby namespaces\n\nPiperOrigin-RevId: 303302813\n\n42f77489b300df2e27c84a7b65c4e8f04da20981\nThis is first release of the API protos and Bazel BUILD files for the Analytics Management API V1alpha.\n\nPiperOrigin-RevId: 303241805\n\n" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "99820243d348191bc9c634f2b48ddf65096285ed", + "log": "99820243d348191bc9c634f2b48ddf65096285ed\nfix: update template files for Node.js libraries (#463)\n\n\n3cbe6bcd5623139ac9834c43818424ddca5430cb\nfix(ruby): remove dead troubleshooting link from generated auth guide (#462)\n\n\na003d8655d3ebec2bbbd5fc3898e91e152265c67\ndocs: remove \"install stable\" instructions (#461)\n\nThe package hasn't been released to PyPI in some time\nf5e8c88d9870d8aa4eb43fa0b39f07e02bfbe4df\nchore(python): add license headers to config files; make small tweaks to templates (#458)\n\n\n" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "osconfig", + "apiVersion": "v1", + "language": "java", + "generator": "bazel" + } + } + ] +} \ No newline at end of file diff --git a/synth.py b/synth.py new file mode 100644 index 00000000..e3ea1567 --- /dev/null +++ b/synth.py @@ -0,0 +1,34 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.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 = 'osconfig' +versions = ['v1'] + +for version in versions: + java.bazel_library( + service=service, + version=version, + package_pattern='com.google.cloud.{service}.{version}', + proto_path=f'google/cloud/{service}/{version}', + bazel_target=f'//google/cloud/{service}/{version}:google-cloud-{service}-{version}-java', + destination_name='os-config', + ) + +java.common_templates() \ No newline at end of file diff --git a/versions.txt b/versions.txt new file mode 100644 index 00000000..5717f0ab --- /dev/null +++ b/versions.txt @@ -0,0 +1,6 @@ +# Format: +# module:released-version:current-version + +google-cloud-os-config:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-os-config-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-os-config-v1:0.0.0:0.0.1-SNAPSHOT \ No newline at end of file